import java.util.Collection;
import java.util.Collections;
-import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import org.opendaylight.controller.sal.core.api.BrokerService;
import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
+import org.opendaylight.controller.sal.core.api.BrokerService;
import org.opendaylight.controller.sal.core.api.Consumer.ConsumerFunctionality;
import org.opendaylight.controller.sal.core.api.Provider.ProviderFunctionality;
import org.opendaylight.controller.sal.core.api.notify.NotificationListener;
private static Logger log = LoggerFactory
.getLogger(NotificationModule.class);
- private Multimap<QName, NotificationListener> listeners = HashMultimap
+ private final Multimap<QName, NotificationListener> listeners = HashMultimap
.create();
private static final Set<Class<? extends BrokerService>> PROVIDED_SERVICE_TYPE = ImmutableSet
private class NotificationConsumerSessionImpl implements
NotificationService {
- private Multimap<QName, NotificationListener> consumerListeners = HashMultimap
+ private final Multimap<QName, NotificationListener> consumerListeners = HashMultimap
.create();
private boolean closed = false;
+ @Override
public Registration<NotificationListener> addNotificationListener(QName notification,
NotificationListener listener) {
checkSessionState();
NotificationPublishService {
@Override
- public void sendNotification(CompositeNode notification) {
+ public void publish(CompositeNode notification) {
checkSessionState();
if (notification == null)
throw new IllegalArgumentException(
"Notification must not be null.");
NotificationModule.this.sendNotification(notification);
}
-
- @Override
- public void publish(CompositeNode notification) {
- sendNotification(notification);
- }
}
@Override