summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
31a2298)
Change-Id: Ic4081b36a557110f6daeb7a6fb8a3b39ee1be8b2
Signed-off-by: Kamal Rameshan <kramesha@cisco.com>
import org.slf4j.LoggerFactory
import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext
import org.slf4j.LoggerFactory
import org.opendaylight.controller.sal.binding.api.AbstractBindingAwareProvider
import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext
+import org.osgi.framework.BundleContext;
class FlowCapableTopologyProvider extends AbstractBindingAwareProvider implements AutoCloseable {
class FlowCapableTopologyProvider extends AbstractBindingAwareProvider implements AutoCloseable {
LOG.info("FlowCapableTopologyProvider stopped.");
listenerRegistration?.close();
}
LOG.info("FlowCapableTopologyProvider stopped.");
listenerRegistration?.close();
}
+
+ /**
+ * Gets called on start of a bundle.
+ * @param session
+ */
override onSessionInitiated(ProviderContext session) {
dataService = session.getSALService(DataProviderService)
notificationService = session.getSALService(NotificationProviderService)
override onSessionInitiated(ProviderContext session) {
dataService = session.getSALService(DataProviderService)
notificationService = session.getSALService(NotificationProviderService)
exporter.start();
listenerRegistration = notificationService.registerNotificationListener(exporter);
}
exporter.start();
listenerRegistration = notificationService.registerNotificationListener(exporter);
}
+
+ /**
+ * Gets called during stop bundle
+ * @param context The execution context of the bundle being stopped.
+ */
+ override stopImpl(BundleContext context) {
+ close();
+ }