Remove OSGi dependency from bgp modules
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / config / AppPeer.java
index 1245f90d1381eae63798ebddef8b5f5b79d2b4fd..aa0c5c32a395aed6087c29d4a2926f26dacdc61b 100644 (file)
@@ -32,7 +32,6 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
-import org.osgi.framework.ServiceRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -44,8 +43,6 @@ public final class AppPeer implements PeerBean, BGPPeerStateConsumer {
     private Neighbor currentConfiguration;
     @GuardedBy("this")
     private BgpAppPeerSingletonService bgpAppPeerSingletonService;
-    @GuardedBy("this")
-    private ServiceRegistration<?> serviceRegistration;
 
     private static ApplicationRibId createAppRibId(final Neighbor neighbor) {
         final Config config = neighbor.getConfig();
@@ -77,10 +74,6 @@ public final class AppPeer implements PeerBean, BGPPeerStateConsumer {
         if (this.bgpAppPeerSingletonService != null) {
             this.bgpAppPeerSingletonService = null;
         }
-        if (this.serviceRegistration != null) {
-            this.serviceRegistration.unregister();
-            this.serviceRegistration = null;
-        }
     }
 
     @Override
@@ -110,10 +103,6 @@ public final class AppPeer implements PeerBean, BGPPeerStateConsumer {
         return this.bgpAppPeerSingletonService.getPeerState();
     }
 
-    synchronized void setServiceRegistration(final ServiceRegistration<?> serviceRegistration) {
-        this.serviceRegistration = serviceRegistration;
-    }
-
     private static final class BgpAppPeerSingletonService implements BGPPeerStateConsumer {
         private final ApplicationPeer applicationPeer;
         private final DOMDataTreeChangeService dataTreeChangeService;