Class HandshakeManagerImpl

    • Constructor Detail

      • HandshakeManagerImpl

        public HandshakeManagerImpl​(ConnectionAdapter connectionAdapter,
                                    Short highestVersion,
                                    List<Short> versionOrder,
                                    ErrorHandler errorHandler,
                                    HandshakeListener handshakeListener,
                                    boolean useVersionBitmap,
                                    DeviceConnectionRateLimiter deviceConnectionRateLimiter,
                                    int deviceConnectionHoldTime,
                                    DeviceConnectionStatusProvider deviceConnectionStatusProvider)
        Constructor.
        Parameters:
        connectionAdapter - connection adaptor for switch
        highestVersion - highest openflow version
        versionOrder - list of version in order for connection protocol negotiation
        errorHandler - the ErrorHandler
        handshakeListener - the HandshakeListener
        useVersionBitmap - should use negotiation bit map
        deviceConnectionRateLimiter - device connection rate limiter utility
        deviceConnectionHoldTime - deivce connection hold time in seconds
        deviceConnectionStatusProvider - utility for maintaining device connection states
    • Method Detail

      • shake

        public void shake​(HelloMessage receivedHello)
        Description copied from interface: HandshakeManager
        Process current handshake step.
        Specified by:
        shake in interface HandshakeManager
        Parameters:
        receivedHello - message from device we need to act upon
      • proposeCommonBitmapVersion

        protected Short proposeCommonBitmapVersion​(List<Elements> list)
        find common highest supported bitmap version.
        Parameters:
        list - bitmap list
        Returns:
        proposed bitmap value
      • proposeNextVersion

        protected short proposeNextVersion​(short remoteVersion)
        find supported version based on remoteVersion.
        Parameters:
        remoteVersion - openflow version supported by remote entity
        Returns:
        openflow version
      • postHandshake

        protected void postHandshake​(Short proposedVersion,
                                     Long xid)
        after handshake set features, register to session.
        Parameters:
        proposedVersion - proposed openflow version
        xid - transaction id
      • isAllowedToConnect

        public boolean isAllowedToConnect​(BigInteger nodeId)