170517bb7a21c34f1b6a0b10be5938822f3936a8
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / osgi / NotificationPublishServiceProxy.java
1 package org.opendaylight.controller.sal.dom.broker.osgi;
2
3 import org.opendaylight.controller.sal.core.api.notify.NotificationListener;
4 import org.opendaylight.controller.sal.core.api.notify.NotificationPublishService;
5 import org.opendaylight.yangtools.concepts.Registration;
6 import org.opendaylight.yangtools.yang.common.QName;
7 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
8 import org.osgi.framework.ServiceReference;
9
10 public class NotificationPublishServiceProxy extends AbstractBrokerServiceProxy<NotificationPublishService> implements NotificationPublishService {
11
12     public NotificationPublishServiceProxy(ServiceReference<NotificationPublishService> ref,
13             NotificationPublishService delegate) {
14         super(ref, delegate);
15     }
16
17     public void sendNotification(CompositeNode notification) {
18         getDelegate().sendNotification(notification);
19     }
20
21     public Registration<NotificationListener> addNotificationListener(QName notification, NotificationListener listener) {
22         return addRegistration(getDelegate().addNotificationListener(notification, listener));
23
24     }
25
26     public void publish(CompositeNode notification) {
27         getDelegate().publish(notification);
28     }
29 }