aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java')
-rwxr-xr-xframework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java74
1 files changed, 8 insertions, 66 deletions
diff --git a/framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java b/framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java
index 1b022c76..aafaf06e 100755
--- a/framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java
+++ b/framework/src/onos/bgp/api/src/main/java/org/onosproject/bgp/controller/BGPPeer.java
@@ -16,30 +16,16 @@
package org.onosproject.bgp.controller;
import java.util.List;
import org.jboss.netty.channel.Channel;
+import org.onosproject.bgpio.protocol.BGPFactory;
import org.onosproject.bgpio.protocol.BGPMessage;
-import org.onosproject.bgpio.protocol.BGPVersion;
/**
- * Represents the peer side of an bgp peer.
+ * Represents the peer side of an BGP peer.
*
*/
public interface BGPPeer {
/**
- * Sets the BGP version for this bgp peer.
- *
- * @param bgpVersion the version to set.
- */
- void setBgpPeerVersion(BGPVersion bgpVersion);
-
- /**
- * Gets the BGP version for this bgp peer.
- *
- * @return bgp identifier.
- */
- int getBgpPeerIdentifier();
-
- /**
* Sets the associated Netty channel for this bgp peer.
*
* @param channel the Netty channel
@@ -54,27 +40,6 @@ public interface BGPPeer {
Channel getChannel();
/**
- * Sets the AS Number for this bgp peer.
- *
- * @param peerASNum the autonomous system number value to set.
- */
- void setBgpPeerASNum(short peerASNum);
-
- /**
- * Sets the hold time for this bgp peer.
- *
- * @param peerHoldTime the hold timer value to set.
- */
- void setBgpPeerHoldTime(short peerHoldTime);
-
- /**
- * Sets the peer identifier value.
- *
- * @param peerIdentifier the bgp peer identifier value.
- */
- void setBgpPeerIdentifier(int peerIdentifier);
-
- /**
* Sets whether the bgp peer is connected.
*
* @param connected whether the bgp peer is connected
@@ -82,15 +47,6 @@ public interface BGPPeer {
void setConnected(boolean connected);
/**
- * Initialises the behaviour.
- *
- * @param bgpId id of bgp peer
- * @param bgpVersion BGP version
- * @param pktStats packet statistics
- */
- void init(BGPId bgpId, BGPVersion bgpVersion, BGPPacketStats pktStats);
-
- /**
* Checks whether the handshake is complete.
*
* @return true is finished, false if not.
@@ -112,18 +68,11 @@ public interface BGPPeer {
void sendMessage(List<BGPMessage> msgs);
/**
- * Gets a string version of the ID for this bgp peer.
+ * Provides the factory for BGP version.
*
- * @return string version of the ID
+ * @return BGP version specific factory.
*/
- String getStringId();
-
- /**
- * Gets the ipAddress of the peer.
- *
- * @return the peer bgpId in IPAddress format
- */
- BGPId getBGPId();
+ BGPFactory factory();
/**
* Checks if the bgp peer is still connected.
@@ -146,16 +95,9 @@ public interface BGPPeer {
String channelId();
/**
- * Gets the negotiated hold time.
- *
- * @return the negotiated hold time
- */
- int getNegotiatedHoldTime();
-
- /**
- * Sets negotiated hold time for the peer.
+ * Return the BGP session info.
*
- * @param negotiatedHoldTime negotiated hold time
+ * @return sessionInfo bgp session info
*/
- void setNegotiatedHoldTime(short negotiatedHoldTime);
+ BgpSessionInfo sessionInfo();
}