本文整理汇总了Java中org.edgexfoundry.domain.meta.CallbackAlert类的典型用法代码示例。如果您正苦于以下问题:Java CallbackAlert类的具体用法?Java CallbackAlert怎么用?Java CallbackAlert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CallbackAlert类属于org.edgexfoundry.domain.meta包,在下文中一共展示了CallbackAlert类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: handlePUT
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handlePUT(@RequestBody CallbackAlert data) {
try {
logger.debug("put callback : '" + data + "'");
return (callbackHandler.handlePUT(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("put error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:edgexfoundry,项目名称:device-modbus,代码行数:10,代码来源:ScheduleController.java
示例2: handlePOST
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handlePOST(@RequestBody CallbackAlert data) {
try {
logger.debug("post callback : '" + data + "'");
return (callbackHandler.handlePOST(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("post error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:edgexfoundry,项目名称:device-modbus,代码行数:10,代码来源:ScheduleController.java
示例3: handleDELETE
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handleDELETE(@RequestBody CallbackAlert data) {
try {
logger.debug("delete callback : '" + data + "'" );
return (callbackHandler.handleDELETE(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("delete error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:edgexfoundry,项目名称:device-modbus,代码行数:10,代码来源:ScheduleController.java
示例4: handlePut
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handlePut(@RequestBody CallbackAlert data) {
try {
logger.debug("put callback : '" + data + "'");
return (callbackHandler.handlePut(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("put error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:mgjeong,项目名称:device-opcua-java,代码行数:10,代码来源:ScheduleController.java
示例5: handlePost
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handlePost(@RequestBody CallbackAlert data) {
try {
logger.debug("post callback : '" + data + "'");
return (callbackHandler.handlePost(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("post error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:mgjeong,项目名称:device-opcua-java,代码行数:10,代码来源:ScheduleController.java
示例6: handleDelete
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
public String handleDelete(@RequestBody CallbackAlert data) {
try {
logger.debug("delete callback : '" + data + "'");
return (callbackHandler.handleDelete(data) == true) ? "true" : "false";
} catch (Exception e) {
logger.error("delete error : " + e.getMessage());
throw new ServiceException(e);
}
}
开发者ID:mgjeong,项目名称:device-opcua-java,代码行数:10,代码来源:ScheduleController.java
示例7: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request, @RequestBody(required=false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
if(actionType == null || id == null || method == null)
throw new ClientException("Callback parameters were null");
if(ActionType.DEVICE.equals(actionType) && method.equals("POST"))
addDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("PUT"))
updateDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("DELETE"))
deleteDevice(id);
if(ActionType.PROFILE.equals(actionType) && method.equals("PUT"))
updateProfile(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST"))
addWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT"))
updateWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE"))
deleteWatcher(id);
// <-- SDK Scheduler Block
if(ActionType.SCHEDULE.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
// SDK Scheduler Block -->
}
开发者ID:edgexfoundry,项目名称:device-modbus,代码行数:44,代码来源:UpdateController.java
示例8: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
}
开发者ID:mgjeong,项目名称:device-opcua-java,代码行数:66,代码来源:UpdateController.java
示例9: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request, @RequestBody(required=false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
if(actionType == null || id == null || method == null)
throw new ClientException("Callback parameters were null");
if(ActionType.DEVICE.equals(actionType) && method.equals("POST"))
addDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("PUT"))
updateDevice(id);
if(ActionType.DEVICE.equals(actionType) && method.equals("DELETE"))
deleteDevice(id);
if(ActionType.PROFILE.equals(actionType) && method.equals("PUT"))
updateProfile(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST"))
addWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT"))
updateWatcher(id);
if(ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE"))
deleteWatcher(id);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST"))
scheduler.handlePOST(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT"))
scheduler.handlePUT(data);
if(ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE"))
scheduler.handleDELETE(data);
}
开发者ID:edgexfoundry,项目名称:device-bacnet,代码行数:42,代码来源:UpdateController.java
示例10: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
}
开发者ID:edgexfoundry,项目名称:device-mqtt,代码行数:43,代码来源:UpdateController.java
示例11: getCallback
import org.edgexfoundry.domain.meta.CallbackAlert; //导入依赖的package包/类
@RequestMapping("/${service.callback}")
public void getCallback(HttpServletRequest request,
@RequestBody(required = false) CallbackAlert data) {
ActionType actionType = data.getType();
String id = data.getId();
String method = request.getMethod();
// TODO: simply this logic using switch statements
if (actionType == null || id == null || method == null) {
throw new ClientException("Callback parameters were null");
}
if (ActionType.DEVICE.equals(actionType) && method.equals("POST")) {
addDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("PUT")) {
updateDevice(id);
}
if (ActionType.DEVICE.equals(actionType) && method.equals("DELETE")) {
deleteDevice(id);
}
if (ActionType.PROFILE.equals(actionType) && method.equals("PUT")) {
updateProfile(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("POST")) {
addWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("PUT")) {
updateWatcher(id);
}
if (ActionType.PROVISIONWATCHER.equals(actionType) && method.equals("DELETE")) {
deleteWatcher(id);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULE.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("POST")) {
scheduler.handlePost(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("PUT")) {
scheduler.handlePut(data);
}
if (ActionType.SCHEDULEEVENT.equals(actionType) && method.equals("DELETE")) {
scheduler.handleDelete(data);
}
}
开发者ID:edgexfoundry,项目名称:device-bluetooth,代码行数:66,代码来源:UpdateController.java
注:本文中的org.edgexfoundry.domain.meta.CallbackAlert类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论