@Test public void deactivate() throws Exception { provider.deactivate(); assertEquals("Device listener should be removed", 0, deviceListeners.size()); assertEquals("Mastership listener should be removed", 0, mastershipListeners.size()); assertFalse("Provider should not be registered", providerRegistry.getProviders().contains(provider)); assertTrue(provider.alarmsExecutor.isShutdown()); assertNull(provider.providerService); }
@Deactivate public void deactivate() { providerRegistry.unregister(this); mastershipService.removeListener(mastershipListener); deviceService.removeListener(deviceListener); alarmsExecutor.shutdown(); providerService = null; log.info("Stopped"); }
PollingAlarmProvider extends AbstractProvider implements AlarmProvider { @Deactivate public void deactivate() { providerRegistry.unregister(this); mastershipService.removeListener(mastershipListener); deviceService.removeListener(deviceListener); alarmsExecutor.shutdown(); providerService = null; log.info("Stopped"); } }
PollingAlarmProvider extends AbstractProvider implements AlarmProvider { @Deactivate public void deactivate() { providerRegistry.unregister(this); mastershipService.removeListener(mastershipListener); deviceService.removeListener(deviceListener); alarmsExecutor.shutdown(); providerService = null; log.info("Stopped"); } PollingAlarmProvider(); }
PollingAlarmProvider extends AbstractProvider implements AlarmProvider { @Deactivate public void deactivate() { providerRegistry.unregister(this); mastershipService.removeListener(mastershipListener); deviceService.removeListener(deviceListener); alarmsExecutor.shutdown(); providerService = null; log.info("Stopped"); } PollingAlarmProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override void triggerProbe(DeviceId deviceId); }
PollingAlarmProvider extends AbstractProvider implements AlarmProvider { @Deactivate public void deactivate() { providerRegistry.unregister(this); mastershipService.removeListener(mastershipListener); deviceService.removeListener(deviceListener); alarmsExecutor.shutdown(); providerService = null; log.info("Stopped"); } PollingAlarmProvider(); @Activate void activate(ComponentContext context); @Deactivate void deactivate(); @Modified void modified(ComponentContext context); @Override void triggerProbe(DeviceId deviceId);  }