X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=netconf%2Fmessagebus-netconf%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fmessagebus%2Feventsources%2Fnetconf%2FNetconfEventSourceManager.java;h=516c595ef7e98a8e3f17d97100e6cb5088180d0d;hb=dadb9010c712e92b430b38aa3ab2de250c48947f;hp=cdbd8d4e4386dba9cb104a74744073be57ccac46;hpb=0daed243d5fa216f5274ad9257f9692dd91c77eb;p=netconf.git diff --git a/netconf/messagebus-netconf/src/main/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceManager.java b/netconf/messagebus-netconf/src/main/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceManager.java index cdbd8d4e43..516c595ef7 100644 --- a/netconf/messagebus-netconf/src/main/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceManager.java +++ b/netconf/messagebus-netconf/src/main/java/org/opendaylight/netconf/messagebus/eventsources/netconf/NetconfEventSourceManager.java @@ -40,12 +40,13 @@ public final class NetconfEventSourceManager implements DataChangeListener, Auto private static final Logger LOG = LoggerFactory.getLogger(NetconfEventSourceManager.class); private static final TopologyKey NETCONF_TOPOLOGY_KEY = new TopologyKey( - new TopologyId(TopologyNetconf.QNAME.getLocalName())); + new TopologyId(TopologyNetconf.QNAME.getLocalName())); private static final InstanceIdentifier NETCONF_DEVICE_PATH = InstanceIdentifier.create(NetworkTopology.class) - .child(Topology.class, NETCONF_TOPOLOGY_KEY).child(Node.class); + .child(Topology.class, NETCONF_TOPOLOGY_KEY).child(Node.class); private Map streamMap; - private final ConcurrentHashMap, NetconfEventSourceRegistration> registrationMap = new ConcurrentHashMap<>(); + private final ConcurrentHashMap, NetconfEventSourceRegistration> registrationMap = + new ConcurrentHashMap<>(); private final DOMNotificationPublishService publishService; private final DOMMountPointService domMounts; private ListenerRegistration listenerRegistration; @@ -67,17 +68,18 @@ public final class NetconfEventSourceManager implements DataChangeListener, Auto } /** - * Invoke by blueprint + * Invoked by blueprint. */ public void initialize() { Preconditions.checkNotNull(dataBroker); listenerRegistration = dataBroker - .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, NETCONF_DEVICE_PATH, this, - DataChangeScope.SUBTREE); + .registerDataChangeListener(LogicalDatastoreType.OPERATIONAL, NETCONF_DEVICE_PATH, this, + DataChangeScope.SUBTREE); LOG.info("NetconfEventSourceManager initialized."); } - @Override public void onDataChanged(final AsyncDataChangeEvent, DataObject> event) { + @Override + public void onDataChanged(final AsyncDataChangeEvent, DataObject> event) { LOG.debug("[DataChangeEvent, DataObject>: {}]", event); for (final Map.Entry, DataObject> changeEntry : event.getCreatedData().entrySet()) { @@ -166,8 +168,9 @@ public final class NetconfEventSourceManager implements DataChangeListener, Auto } /** - * Invoke by blueprint - * @param streamMap + * Invoked by blueprint. + * + * @param streamMap Stream map */ public void setStreamMap(Map streamMap) { this.streamMap = streamMap; @@ -177,7 +180,8 @@ public final class NetconfEventSourceManager implements DataChangeListener, Auto return node.getAugmentation(NetconfNode.class) != null; } - @Override public void close() { + @Override + public void close() { listenerRegistration.close(); for (final NetconfEventSourceRegistration reg : registrationMap.values()) { reg.close();