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.Broker.ConsumerSession;
import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
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;
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 void sendNotification(CompositeNode notification) {
QName type = notification.getNodeType();
Collection<NotificationListener> toNotify = listeners.get(type);
private void sendNotification(CompositeNode notification) {
QName type = notification.getNodeType();
Collection<NotificationListener> toNotify = listeners.get(type);
public Registration<NotificationListener> addNotificationListener(QName notification,
NotificationListener listener) {
checkSessionState();
public Registration<NotificationListener> addNotificationListener(QName notification,
NotificationListener listener) {
checkSessionState();
consumerListeners.put(notification, listener);
listeners.put(notification, listener);
consumerListeners.put(notification, listener);
listeners.put(notification, listener);
checkSessionState();
if (notification == null)
throw new IllegalArgumentException(
"Notification must not be null.");
NotificationModule.this.sendNotification(notification);
}
checkSessionState();
if (notification == null)
throw new IllegalArgumentException(
"Notification must not be null.");
NotificationModule.this.sendNotification(notification);
}