Bug-6781: Inbound and outbound connection attempts from controller are not synchronized
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / spi / BGPPeerRegistry.java
index 0dcc142b2f673d7439db8cbab419c74842ae91cc..f71ce640a666dd9605167a5465d5f80f38e4af67 100644 (file)
@@ -84,4 +84,14 @@ public interface BGPPeerRegistry extends AutoCloseable {
      */
     @Nonnull AutoCloseable registerPeerRegisterListener(@Nonnull PeerRegistryListener listener);
 
+    /**
+     * Register PeerRegistrySessionListener, which listens to the changes in sessions
+     * of peers in peer registry (create session, remove session). After registration,
+     * an initial drop is provided by calling onSessionCreated().
+     *
+     * @param listener The PeerRegistrySessionListener to be registered.
+     * @return Registration ticked, used for closing of registration.
+     */
+    @Nonnull AutoCloseable registerPeerSessionListener(PeerRegistrySessionListener listener);
+
 }