X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=netconf-server%2Fsrc%2Fmain%2Fjava%2Forg%2Fcommscope%2Ftr069adapter%2Fnetconf%2Frestapi%2FNotificationReceiverService.java;h=ec5896795bb8c5b12c8f3fa2b4f832708142a1b1;hb=76744e810f35c84ecbd1d9998e361052466e9483;hp=7186363d2fe6950380a798b007e3ac1b8bd0668b;hpb=ce4e2d38e3d42725f61c39dd172325d2def4bc44;p=oam%2Ftr069-adapter.git diff --git a/netconf-server/src/main/java/org/commscope/tr069adapter/netconf/restapi/NotificationReceiverService.java b/netconf-server/src/main/java/org/commscope/tr069adapter/netconf/restapi/NotificationReceiverService.java index 7186363..ec58967 100644 --- a/netconf-server/src/main/java/org/commscope/tr069adapter/netconf/restapi/NotificationReceiverService.java +++ b/netconf-server/src/main/java/org/commscope/tr069adapter/netconf/restapi/NotificationReceiverService.java @@ -16,33 +16,31 @@ * ===============LICENSE_END======================================================================= */ -package org.commscope.tr069adapter.netconf.restapi; - -import org.commscope.tr069adapter.mapper.model.NetConfNotificationDTO; -import org.commscope.tr069adapter.netconf.notification.NotificationHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/netConfNotificationService") -public class NotificationReceiverService { - - private static final Logger LOG = LoggerFactory.getLogger(NotificationReceiverService.class); - - @Autowired - NotificationHandler handler; - - @PostMapping("/notification") - public void processNotification(@RequestBody NetConfNotificationDTO netConNotifDTO) { - System.out.println("Received NetConf Notification :" + netConNotifDTO); - LOG.debug("Received NetConf Notification :" + netConNotifDTO); - handler.handleNetConfNotification(netConNotifDTO); - LOG.debug("Processed NetConf Notification for :" + netConNotifDTO); - System.out.println("Processed NetConf Notification for :" + netConNotifDTO); - } -} +package org.commscope.tr069adapter.netconf.restapi; + +import org.commscope.tr069adapter.mapper.model.NetConfNotificationDTO; +import org.commscope.tr069adapter.netconf.notification.NotificationHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/netConfNotificationService") +public class NotificationReceiverService { + + private static final Logger LOG = LoggerFactory.getLogger(NotificationReceiverService.class); + + @Autowired + NotificationHandler handler; + + @PostMapping("/notification") + public void processNotification(@RequestBody NetConfNotificationDTO netConNotifDTO) { + LOG.debug("Received NetConf Notification : {}", netConNotifDTO); + handler.handleNetConfNotification(netConNotifDTO); + LOG.debug("Processed NetConf Notification for : {}", netConNotifDTO); + } +}