@Test public void deactivate() throws Exception { manager.updateAlarms(DEVICE_ID, ImmutableSet.of(ALARM_B, ALARM_A)); verifyGettingSetsOfAlarms(manager, 2, 2); alarmStore.deactivate(); manager.removeListener(listener); manager.deactivate(); NetTestTools.injectEventDispatcher(manager, null); assertFalse("Store should not have delegate", alarmStore.hasDelegate()); }
@Deactivate public void deactivate() { store.unsetDelegate(delegate); eventDispatcher.removeSink(AlarmEvent.class); log.info("Stopped"); }
AlarmManager extends AbstractListenerProviderRegistry<AlarmEvent, AlarmListener, AlarmProvider, AlarmProviderService> implements AlarmService, AlarmProviderRegistry { @Deactivate public void deactivate() { store.unsetDelegate(delegate); eventDispatcher.removeSink(AlarmEvent.class); log.info("Stopped"); } }
AlarmManager extends AbstractListenerProviderRegistry<AlarmEvent, AlarmListener, AlarmProvider, AlarmProviderService> implements AlarmService, AlarmProviderRegistry { @Deactivate public void deactivate() { store.unsetDelegate(delegate); eventDispatcher.removeSink(AlarmEvent.class); log.info("Stopped"); }  }
AlarmManager extends AbstractListenerProviderRegistry<AlarmEvent, AlarmListener, AlarmProvider, AlarmProviderService> implements AlarmService, AlarmProviderRegistry { @Deactivate public void deactivate() { store.unsetDelegate(delegate); eventDispatcher.removeSink(AlarmEvent.class); log.info("Stopped"); }  @Activate void activate(); @Deactivate void deactivate(); @Modified boolean modified(); @Override Alarm updateBookkeepingFields(AlarmId id, boolean isAcknowledged, String assignedUser); Alarm clear(AlarmId id); @Override Map<Alarm.SeverityLevel, Long> getAlarmCounts(DeviceId deviceId); @Override Map<Alarm.SeverityLevel, Long> getAlarmCounts(); @Override Alarm getAlarm(AlarmId alarmId); @Override Set<Alarm> getAlarms(); @Override Set<Alarm> getActiveAlarms(); @Override Set<Alarm> getAlarms(Alarm.SeverityLevel severity); @Override Set<Alarm> getAlarms(DeviceId deviceId); @Override Set<Alarm> getAlarms(DeviceId deviceId, AlarmEntityId source); @Override Set<Alarm> getAlarmsForLink(ConnectPoint src, ConnectPoint dst); @Override Set<Alarm> getAlarmsForFlow(DeviceId deviceId, long flowId); }
AlarmManager extends AbstractListenerProviderRegistry<AlarmEvent, AlarmListener, AlarmProvider, AlarmProviderService> implements AlarmService, AlarmProviderRegistry { @Deactivate public void deactivate() { store.unsetDelegate(delegate); eventDispatcher.removeSink(AlarmEvent.class); log.info("Stopped"); }  @Activate void activate(); @Deactivate void deactivate(); @Modified boolean modified(); @Override Alarm updateBookkeepingFields(AlarmId id, boolean isAcknowledged, String assignedUser); Alarm clear(AlarmId id); @Override Map<Alarm.SeverityLevel, Long> getAlarmCounts(DeviceId deviceId); @Override Map<Alarm.SeverityLevel, Long> getAlarmCounts(); @Override Alarm getAlarm(AlarmId alarmId); @Override Set<Alarm> getAlarms(); @Override Set<Alarm> getActiveAlarms(); @Override Set<Alarm> getAlarms(Alarm.SeverityLevel severity); @Override Set<Alarm> getAlarms(DeviceId deviceId); @Override Set<Alarm> getAlarms(DeviceId deviceId, AlarmEntityId source); @Override Set<Alarm> getAlarmsForLink(ConnectPoint src, ConnectPoint dst); @Override Set<Alarm> getAlarmsForFlow(DeviceId deviceId, long flowId);  }