X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fmessagebus-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmessagebus%2Fapp%2Fimpl%2FEventSourceTopology.java;h=7771b82491f61f90207ac737742538bf370323d0;hp=10b9ec83cde9080a5eb652ea69b65936973b0f60;hb=08d14bd2821233d6f2eb6f03e143745393f530bc;hpb=9f1061c46af5220ad95d8d0b94411ba2fd832a50 diff --git a/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopology.java b/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopology.java index 10b9ec83cd..7771b82491 100644 --- a/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopology.java +++ b/opendaylight/md-sal/messagebus-impl/src/main/java/org/opendaylight/controller/messagebus/app/impl/EventSourceTopology.java @@ -78,10 +78,10 @@ public class EventSourceTopology implements EventAggregatorService, EventSourceR .child(TopologyTypes.class) .augmentation(TopologyTypes1.class); - private final Map> topicListenerRegistrations = + private final Map> topicListenerRegistrations = new ConcurrentHashMap<>(); private final Map> routedRpcRegistrations = - new ConcurrentHashMap<>();; + new ConcurrentHashMap<>(); private final DataBroker dataBroker; private final RpcRegistration aggregatorRpcReg; @@ -205,12 +205,16 @@ public class EventSourceTopology implements EventAggregatorService, EventSourceR } public void register(final EventSource eventSource){ - NodeKey nodeKey = eventSource.getSourceNodeKey(); + NodeKey nodeKey = eventSource.getSourceNodeKey(); final KeyedInstanceIdentifier sourcePath = EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class, nodeKey); RoutedRpcRegistration reg = rpcRegistry.addRoutedRpcImplementation(EventSourceService.class, eventSource); reg.registerPath(NodeContext.class, sourcePath); routedRpcRegistrations.put(nodeKey,reg); insert(sourcePath); + + for(EventSourceTopic est : topicListenerRegistrations.keySet()){ + est.notifyNode(EVENT_SOURCE_TOPOLOGY_PATH.child(Node.class, nodeKey)); + } } public void unRegister(final EventSource eventSource){