[Emu] [ONOS-2591,ONOS-2594] Implementation of BGP channel handler to manage each BGP peer connection.
Change-Id: I14e90c9437f676698f89da79e736a81035689492
diff --git a/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPController.java b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPController.java
index 6d75812..49432aa 100755
--- a/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPController.java
+++ b/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPController.java
@@ -25,6 +25,21 @@
public interface BGPController {
/**
+ * Returns list of bgp peers connected to this BGP controller.
+ *
+ * @return Iterable of BGPPeer elements
+ */
+ Iterable<BGPPeer> getPeers();
+
+ /**
+ * Returns the actual bgp peer for the given ip address.
+ *
+ * @param bgpId the id of the bgp peer to fetch
+ * @return the interface to this bgp peer
+ */
+ BGPPeer getPeer(BGPId bgpId);
+
+ /**
* Send a message to a particular bgp peer.
*
* @param bgpId the id of the peer to send message.
@@ -41,9 +56,22 @@
void processBGPPacket(BGPId bgpId, BGPMessage msg);
/**
+ * Close all connected BGP peers.
+ *
+ */
+ void closeConnectedPeers();
+
+ /**
* Get the BGPConfig class to the caller.
*
* @return configuration object
*/
BGPCfg getConfig();
+
+ /**
+ * Get the BGP connected peers to this controller.
+ *
+ * @return the integer number
+ */
+ int getBGPConnNumber();
}
\ No newline at end of file