[ONOS-2594] Channel handle to manage session handling with BGP peers
Change-Id: I6c58c674aa17e2a86b063e248af589d524ec5fe3
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 49432aa..faa1de3 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
@@ -16,6 +16,9 @@
package org.onosproject.bgp.controller;
+import java.util.Map;
+
+import org.onosproject.bgpio.exceptions.BGPParseException;
import org.onosproject.bgpio.protocol.BGPMessage;
/**
@@ -52,8 +55,9 @@
*
* @param bgpId id of the peer the message arrived on
* @param msg the message to process.
+ * @throws BGPParseException on data processing error
*/
- void processBGPPacket(BGPId bgpId, BGPMessage msg);
+ void processBGPPacket(BGPId bgpId, BGPMessage msg) throws BGPParseException;
/**
* Close all connected BGP peers.
@@ -73,5 +77,19 @@
*
* @return the integer number
*/
- int getBGPConnNumber();
+ int connectedPeerCount();
+
+ /**
+ * Return BGP peer manager.
+ *
+ * @return BGPPeerManager peer manager instance
+ */
+ BgpPeerManager peerManager();
+
+ /**
+ * Return BGP connected peers.
+ *
+ * @return connectedPeers connected peers
+ */
+ Map<BGPId, BGPPeer> connectedPeers();
}
\ No newline at end of file