private NotificationListener notificationListener;
private ListenerRegistration<?> registration;
- public void setNotificationService(NotificationService notificationService) {
+ public void setNotificationService(final NotificationService notificationService) {
this.notificationService = notificationService;
}
- public void setNotificationListener(NotificationListener notificationListener) {
+
+ public void setNotificationListener(final NotificationListener notificationListener) {
this.notificationListener = notificationListener;
}
- public void setBundle(Bundle bundle) {
+ public void setBundle(final Bundle bundle) {
this.bundle = bundle;
}
- @SuppressWarnings({ })
public void init() {
LOG.debug("{}: init - registering NotificationListener {}", bundle.getSymbolicName(), notificationListener);
}
public void destroy() {
- if(registration != null) {
+ if (registration != null) {
+ LOG.debug("{}: destroy - closing ListenerRegistration {}", bundle.getSymbolicName(), notificationListener);
registration.close();
+ } else {
+ LOG.debug("{}: destroy - listener was not registered", bundle.getSymbolicName());
}
}
}