Interface ConnectorHandler<E>

All Known Subinterfaces:
SocketConnectorHandler
All Known Implementing Classes:
AbstractSocketConnectorHandler, NIOTransport, TCPNIOConnectorHandler, TCPNIOTransport, UDPNIOConnectorHandler, UDPNIOTransport, UDPNIOTransport.TransportConnectorHandler

public interface ConnectorHandler<E>
Client side connector handler API. ConnectorHandler is responsible for creating and initializing Connection, and optionally connect it to a specific local/remote address.
Author:
Alexey Stashok
  • Method Details

    • connect

      Future<Connection> connect(E remoteAddress)
      Creates, initializes and establishes Connection to the specific remoteAddress.
      Parameters:
      remoteAddress - remote address to connect to
      Returns:
      Future of connect operation, which could be used to get resulting Connection
    • connect

      void connect(E remoteAddress, CompletionHandler<Connection> completionHandler)
      Creates, initializes and establishes Connection to the specific remoteAddress.
      Parameters:
      remoteAddress - remote address to connect to
      completionHandler - CompletionHandler
    • connect

      Future<Connection> connect(E remoteAddress, E localAddress)
      Creates, initializes Connection, binds it to the specific local and remote remoteAddress.
      Parameters:
      remoteAddress - remote address to connect to
      localAddress - local address to bind a Connection to
      Returns:
      Future of connect operation, which could be used to get resulting Connection
    • connect

      void connect(E remoteAddress, E localAddress, CompletionHandler<Connection> completionHandler)
      Creates, initializes Connection, binds it to the specific local and remote remoteAddress.
      Parameters:
      remoteAddress - remote address to connect to
      localAddress - local address to bind a Connection to
      completionHandler - CompletionHandler