@Activate protected void activate() { providerService = providerRegistry.register(this); log.info("Started"); }
@Deactivate public void deactivate() { providerRegistry.unregister(this); providerService = null; log.info("Stopped"); }
@Deactivate protected void deactivate() { providerRegistry.unregister(this); providerService = null; log.info("Stopped"); }
@Activate public void activate() { providerService = providerRegistry.register(this); controller.addNodeListener(innerNodeListener); log.info("Started"); }
@Deactivate public void deactivate() { netcfgService.removeListener(listener); deviceProviderRegistry.unregister(deviceProvider); worker.shutdown(); try { worker.awaitTermination(5, TimeUnit.SECONDS); } catch (InterruptedException e) { log.warn("Interrupted.", e); Thread.currentThread().interrupt(); } factories.forEach(netcfgRegistry::unregisterConfigFactory); log.info("Stopped"); }
@Activate public void activate() { worker = newSingleThreadExecutor(groupedThreads("onos/inject", "worker", log)); providerService = deviceProviderRegistry.register(deviceProvider); netcfgService.addListener(listener); factories.forEach(netcfgRegistry::registerConfigFactory); log.info("Started"); }
@Deactivate public void deactivate(ComponentContext context) { cfgService.unregisterProperties(getClass(), false); listener.disable(); controller.removeListener(listener); providerRegistry.unregister(this); collectors.values().forEach(PortStatsCollector::stop); collectors.clear(); providerService = null; LOG.info("Stopped"); }
@Activate public void activate() { appId = coreService.registerApplication(APP_NAME); providerService = providerRegistry.register(this); cfgService.registerConfigFactory(factory); cfgService.addListener(cfgLister); executor.execute(RestDeviceProvider.this::connectDevices); log.info("Started"); }
@Deactivate public void deactivate() { cfgService.removeListener(cfgLister); controller.getDevices().keySet().forEach(this::deviceRemoved); providerRegistry.unregister(this); providerService = null; cfgService.unregisterConfigFactory(factory); log.info("Stopped"); }
@Activate public void activate() { deviceProviderService = deviceProviderRegistry.register(this); linkProviderService = linkProviderRegistry.register(this); controller.addRouterListener(listener); controller.addLinkListener(listener); log.debug("IsisDeviceProvider::activate...!!!!"); }
@Deactivate public void deactivate() { log.debug("IsisDeviceProvider::deactivate...!!!!"); deviceProviderRegistry.unregister(this); deviceProviderService = null; linkProviderRegistry.unregister(this); linkProviderService = null; controller.removeRouterListener(listener); controller.removeLinkListener(listener); log.info("deactivated...!!!"); }
@Activate public void activate() { deviceProviderService = deviceProviderRegistry.register(this); linkProviderService = linkProviderRegistry.register(this); controller.addRouterListener(listener); controller.addLinkListener(listener); log.debug("IsisDeviceProvider::activate...!!!!"); }
@Deactivate public void deactivate() { log.debug("IsisDeviceProvider::deactivate...!!!!"); deviceProviderRegistry.unregister(this); deviceProviderService = null; linkProviderRegistry.unregister(this); linkProviderService = null; controller.removeRouterListener(listener); controller.removeLinkListener(listener); }
@Activate public void activate(ComponentContext context) { cfgService.registerProperties(getClass()); providerService = providerRegistry.register(this); controller.addListener(listener); controller.addEventListener(listener); connectInitialDevices(); LOG.info("Started"); }
@Deactivate public void deactivate(ComponentContext context) { try { controller.getDevices().stream().forEach(device -> { deviceBuilderExecutor.execute(new DeviceFactory(device, false)); }); deviceBuilderExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS); } catch (InterruptedException e) { log.error("Device builder did not terminate"); } deviceBuilderExecutor.shutdownNow(); netCfgService.unregisterConfigFactory(factory); netCfgService.removeListener(cfgLister); providerRegistry.unregister(this); providerService = null; log.info("Stopped"); }
@Activate public void activate(ComponentContext context) { providerService = providerRegistry.register(this); appId = coreService.registerApplication(APP_NAME); netCfgService.registerConfigFactory(factory); netCfgService.addListener(cfgLister); modified(context); log.info("Started"); }