本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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 -->
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
}