Class HandshakeManagerImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.connection.HandshakeManagerImpl
- All Implemented Interfaces:
HandshakeManager
-
Constructor Summary
ConstructorDescriptionHandshakeManagerImpl
(ConnectionAdapter connectionAdapter, org.opendaylight.yangtools.yang.common.Uint8 highestVersion, List<org.opendaylight.yangtools.yang.common.Uint8> versionOrder, ErrorHandler errorHandler, HandshakeListener handshakeListener, boolean useVersionBitmap, DeviceConnectionRateLimiter deviceConnectionRateLimiter, int deviceConnectionHoldTime, DeviceConnectionStatusProvider deviceConnectionStatusProvider) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionorg.opendaylight.yangtools.yang.common.Uint8
Return negotiated version.boolean
isAllowedToConnect
(BigInteger nodeId) protected void
postHandshake
(org.opendaylight.yangtools.yang.common.Uint8 proposedVersion, org.opendaylight.yangtools.yang.common.Uint32 xid) after handshake set features, register to session.protected org.opendaylight.yangtools.yang.common.Uint8
find common highest supported bitmap version.protected org.opendaylight.yangtools.yang.common.Uint8
proposeNextVersion
(org.opendaylight.yangtools.yang.common.Uint8 remoteVersion) find supported version based on remoteVersion.void
shake
(HelloMessage receivedHello) Process current handshake step.
-
Constructor Details
-
HandshakeManagerImpl
public HandshakeManagerImpl(ConnectionAdapter connectionAdapter, org.opendaylight.yangtools.yang.common.Uint8 highestVersion, List<org.opendaylight.yangtools.yang.common.Uint8> versionOrder, ErrorHandler errorHandler, HandshakeListener handshakeListener, boolean useVersionBitmap, DeviceConnectionRateLimiter deviceConnectionRateLimiter, int deviceConnectionHoldTime, DeviceConnectionStatusProvider deviceConnectionStatusProvider) Constructor.- Parameters:
connectionAdapter
- connection adaptor for switchhighestVersion
- highest openflow versionversionOrder
- list of version in order for connection protocol negotiationerrorHandler
- the ErrorHandlerhandshakeListener
- the HandshakeListeneruseVersionBitmap
- should use negotiation bit mapdeviceConnectionRateLimiter
- device connection rate limiter utilitydeviceConnectionHoldTime
- deivce connection hold time in secondsdeviceConnectionStatusProvider
- utility for maintaining device connection states
-
-
Method Details
-
shake
Description copied from interface:HandshakeManager
Process current handshake step.- Specified by:
shake
in interfaceHandshakeManager
- Parameters:
receivedHello
- message from device we need to act upon
-
getVersion
public org.opendaylight.yangtools.yang.common.Uint8 getVersion()Description copied from interface:HandshakeManager
Return negotiated version.- Specified by:
getVersion
in interfaceHandshakeManager
- Returns:
- negotiated version.
-
proposeCommonBitmapVersion
protected org.opendaylight.yangtools.yang.common.Uint8 proposeCommonBitmapVersion(List<Elements> list) find common highest supported bitmap version.- Parameters:
list
- bitmap list- Returns:
- proposed bitmap value
-
proposeNextVersion
protected org.opendaylight.yangtools.yang.common.Uint8 proposeNextVersion(org.opendaylight.yangtools.yang.common.Uint8 remoteVersion) find supported version based on remoteVersion.- Parameters:
remoteVersion
- openflow version supported by remote entity- Returns:
- openflow version
-
postHandshake
protected void postHandshake(org.opendaylight.yangtools.yang.common.Uint8 proposedVersion, org.opendaylight.yangtools.yang.common.Uint32 xid) after handshake set features, register to session.- Parameters:
proposedVersion
- proposed openflow versionxid
- transaction id
-
isAllowedToConnect
-