Interface ConnectionAdapter

    • Method Detail

      • disconnect

        Future<Boolean> disconnect()
        Disconnect corresponding switch.
        future set to true, when disconnect completed
      • isAlive

        boolean isAlive()
        Determines if the connection to the switch is alive.
        true, if connection to switch is alive
      • getRemoteAddress

        InetSocketAddress getRemoteAddress()
        Returns the address of the connected switch.
        address of the remote end - address of a switch if connected
      • setMessageListener

        void setMessageListener​(OpenflowProtocolListener messageListener)
        Sets the protocol message listener.
        messageListener - here will be pushed all messages from switch
      • setSystemListener

        void setSystemListener​(SystemNotificationsListener systemListener)
        Sets the system message listener.
        systemListener - here will be pushed all system messages from library
      • setAlienMessageListener

        void setAlienMessageListener​(AlienMessageListener alienMessageListener)
        Set handler for alien messages received from device.
        alienMessageListener - here will be pushed all alien messages from switch
      • checkListeners

        void checkListeners()
        Throws exception if any of required listeners is missing.
      • fireConnectionReadyNotification

        void fireConnectionReadyNotification()
        Notify listener about connection ready-to-use event.
      • onSwitchCertificateIdentified

        void onSwitchCertificateIdentified​(@Nullable List<X509Certificate> certificateChain)
        Notify listener about switch certificate information.
        certificateChain - X509 certificate chain presented by the switch
      • setConnectionReadyListener

        void setConnectionReadyListener​(ConnectionReadyListener connectionReadyListener)
        Set listener for connection became ready-to-use event.
        connectionReadyListener - listens to connection ready event
      • setAutoRead

        void setAutoRead​(boolean autoRead)
        Sets option for automatic channel reading - if set to false, incoming messages won't be read.
        autoRead - target value to be switched to
      • isAutoRead

        boolean isAutoRead()
        Determines if the channel is configured to auto-read.
        true, if channel is configured to auto-read
      • registerOutboundQueueHandler

        <T extends OutboundQueueHandlerOutboundQueueHandlerRegistration<T> registerOutboundQueueHandler​(T handler,
                                                                                                          int maxQueueDepth,
                                                                                                          long maxBarrierNanos)
        Registers a new bypass outbound queue.
        Type Parameters:
        T - handler type
        handler - queue handler
        maxQueueDepth - max amount of not confirmed messaged in queue (i.e. edge for barrier message)
        maxBarrierNanos - regular base for barrier message
        An OutboundQueueHandlerRegistration
      • setPacketInFiltering

        void setPacketInFiltering​(boolean enabled)
        Set filtering of PacketIn messages. By default these messages are not filtered.
        enabled - True if PacketIn messages should be filtered, false if they should be reported.
      • setDatapathId

        void setDatapathId​(BigInteger datapathId)
        Set datapathId for the dpn.
        datapathId - of the dpn
      • setExecutorService

        void setExecutorService​(ExecutorService executorService)
        Sets executorService.
        executorService - for all dpns