\r
import com.fasterxml.jackson.core.JsonProcessingException;\r
\r
+import org.commscope.tr069adapter.acs.common.DeviceRPCRequest;\r
+import org.commscope.tr069adapter.acs.common.DeviceRPCResponse;\r
import org.commscope.tr069adapter.acs.common.inform.BootstrapInform;\r
+import org.commscope.tr069adapter.acs.common.inform.ConnectionRequestInform;\r
import org.commscope.tr069adapter.acs.common.inform.PeriodicInform;\r
import org.commscope.tr069adapter.acs.common.inform.ValueChangeInform;\r
import org.commscope.tr069adapter.mapper.model.VESNotification;\r
import org.commscope.tr069adapter.mapper.model.VESNotificationResponse;\r
+import org.commscope.tr069adapter.vesagent.async.WaitForNotifications;\r
import org.commscope.tr069adapter.vesagent.exception.InvalidFaultOperationException;\r
import org.slf4j.Logger;\r
import org.slf4j.LoggerFactory;\r
@Autowired\r
HeartBeatMessageHandler hbHandler;\r
\r
+ @Autowired\r
+ WaitForNotifications waitForNotifications;\r
+\r
@PostMapping(path = "/deviceEvent", consumes = "application/json")\r
public VESNotificationResponse processDeviceNotificationAsVESEvent(\r
@RequestBody VESNotification notification)\r
} else if (notification.getDevnotification() instanceof BootstrapInform) {\r
logger.debug("VES Notification request PnfRegister processing started");\r
response = pnfHandler.handlePnfRegNotification(notification);\r
+ hbHandler.handleRegisterRequest(notification);\r
logger.debug("VES Notification request PnfRegister processing completed");\r
} else if (notification.getDevnotification() instanceof ValueChangeInform) {\r
logger.debug("VES Notification request Fault processing started");\r
response = alarmHanler.handleAlarmNotification(notification);\r
+ waitForNotifications.notifyDeviceNotification(notification);\r
logger.debug("VES Notification request Fault processing completed");\r
} else if (notification.getDevnotification() instanceof PeriodicInform) {\r
logger.debug("VES Notification request PI processing started");\r
- response = hbHandler.handlePINotification(notification);\r
+ waitForNotifications.notifyDeviceNotification(notification);\r
logger.debug("VES Notification request PI processing completed");\r
+ } else if (notification.getDevnotification() instanceof ConnectionRequestInform) {\r
+ logger.debug("Recieived ConnectionRequest inform from device.");\r
+ waitForNotifications.notifyDeviceNotification(notification);\r
} else {\r
logger.error("VES Notification request is unknown");\r
response =\r
logger.debug("VES Notification request processing completed");\r
return response;\r
}\r
+\r
+ @PostMapping(path = "/deleteConfig", consumes = "application/json")\r
+ public VESNotificationResponse processDeleteConfigRequest(\r
+ @RequestBody VESNotification vesNotification) {\r
+ VESNotificationResponse response = null;\r
+\r
+ logger.debug("Initiating deleteConfig VES Notification request");\r
+ response = hbHandler.handleDeleteConfigRequest(vesNotification);\r
+ logger.debug("deleteConfig VES Notification request is completed");\r
+ return response;\r
+ }\r
+\r
+ @PostMapping(path = "/editConfig", consumes = "application/json")\r
+ public DeviceRPCResponse processEditConfigRequest(\r
+ @RequestBody DeviceRPCRequest deviceRPCRequest) {\r
+ DeviceRPCResponse response = null;\r
+\r
+ logger.debug("Initiating setConfig VES Notification request");\r
+ response = hbHandler.handleSetConfigRequest(deviceRPCRequest);\r
+ logger.debug("setConfig VES Notification request is compelted");\r
+ return response;\r
+ }\r
+\r
+ @PostMapping(path = "/getConfig", consumes = "application/json")\r
+ public DeviceRPCResponse processGetConfigRequest(@RequestBody DeviceRPCRequest deviceRPCRequest) {\r
+ DeviceRPCResponse response = null;\r
+\r
+ logger.debug("Initiating getConfig VES Notification request");\r
+ response = hbHandler.handleGetConfigRequest(deviceRPCRequest);\r
+ logger.debug("getConfig VES Notification request is compelted");\r
+ return response;\r
+ }\r
}\r