当前位置: 首页>>代码示例>>Java>>正文


Java CallbackAlert.getId方法代码示例

本文整理汇总了Java中org.edgexfoundry.domain.meta.CallbackAlert.getId方法的典型用法代码示例。如果您正苦于以下问题:Java CallbackAlert.getId方法的具体用法?Java CallbackAlert.getId怎么用?Java CallbackAlert.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.edgexfoundry.domain.meta.CallbackAlert的用法示例。


在下文中一共展示了CallbackAlert.getId方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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.getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。