X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Fimpl%2FServicehandlerProvider.java;h=9237fd28494c7f7865186ff5e7a9207f2f59cbe2;hb=f635c4d0e4252050154b89d53bd7e658eaf75be8;hp=29e838d16d1047921735fc94e1e7f1c50d94d967;hpb=96a25ab4d2588960ceadf60e3d97f849a8d62cbe;p=transportpce.git diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java index 29e838d16..9237fd284 100644 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/impl/ServicehandlerProvider.java @@ -13,9 +13,10 @@ import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService import org.opendaylight.controller.md.sal.binding.api.NotificationService; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration; import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry; -import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev161014.ServicehandlerService; +import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.servicehandler.rev170930.ServicehandlerService; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubpce.rev170426.StubpceListener; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.StubrendererListener; +import org.opendaylight.yang.gen.v1.http.org.openroadm.service.rev161014.OrgOpenroadmServiceService; import org.opendaylight.yangtools.concepts.ListenerRegistration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,7 +24,8 @@ import org.slf4j.LoggerFactory; /** * Class to register * Servicehandler Service and Notification. - * @author Martial Coulibaly ( martial.coulibaly@gfi.com ) on behalf of Orange + * + * @author Martial Coulibaly on behalf of Orange * */ public class ServicehandlerProvider { @@ -35,12 +37,11 @@ public class ServicehandlerProvider { private final NotificationService notificationService; private final NotificationPublishService notificationPublishService; - //private ListenerRegistration ServicehandlerlistenerRegistration; - /* Listener register for StubPce Notification. */ - private ListenerRegistration stubPcelistenerRegistration; - /* Listener register for StubRender Notification. */ - private ListenerRegistration stubRendererlistenerRegistration; - private RpcRegistration rpcRegistration; + /** Listener register for TransportpceService Notification. */ + private ListenerRegistration stubpcelistenerRegistration; + private ListenerRegistration stubrendererlistenerRegistration; + private RpcRegistration rpcRegistration; + private RpcRegistration rpcRegistrationServiceHandler; public ServicehandlerProvider(final DataBroker dataBroker, RpcProviderRegistry rpcProviderRegistry, @@ -57,9 +58,10 @@ public class ServicehandlerProvider { public void init() { LOG.info("ServicehandlerProvider Session Initiated"); final ServicehandlerImpl consumer = new ServicehandlerImpl(dataBroker, rpcRegistry, notificationPublishService); - stubPcelistenerRegistration = notificationService.registerNotificationListener(consumer); - stubRendererlistenerRegistration = notificationService.registerNotificationListener(consumer); - rpcRegistration = rpcRegistry.addRpcImplementation(ServicehandlerService.class, consumer); + stubpcelistenerRegistration = notificationService.registerNotificationListener(consumer); + stubrendererlistenerRegistration = notificationService.registerNotificationListener(consumer); + rpcRegistration = rpcRegistry.addRpcImplementation(OrgOpenroadmServiceService.class, consumer); + rpcRegistrationServiceHandler = rpcRegistry.addRpcImplementation(ServicehandlerService.class, consumer); } /** @@ -67,8 +69,9 @@ public class ServicehandlerProvider { */ public void close() { LOG.info("ServicehandlerProvider Closed"); - stubPcelistenerRegistration.close(); - stubRendererlistenerRegistration.close(); + stubpcelistenerRegistration.close(); + stubrendererlistenerRegistration.close(); rpcRegistration.close(); + rpcRegistrationServiceHandler.close(); } }