Interface SocketConnectorHandler

All Superinterfaces:
ConnectorHandler<SocketAddress>
All Known Implementing Classes:
AbstractSocketConnectorHandler, NIOTransport, TCPNIOConnectorHandler, TCPNIOTransport, UDPNIOConnectorHandler, UDPNIOTransport, UDPNIOTransport.TransportConnectorHandler

public interface SocketConnectorHandler extends ConnectorHandler<SocketAddress>
Socket based client side connector. SocketConnectorHandler is responsible for creating and initializing Connection, and optionally connect is to a specific local/remote address.
Author:
Alexey Stashok
  • Field Details

    • DEFAULT_CONNECTION_TIMEOUT

      static final int DEFAULT_CONNECTION_TIMEOUT
      See Also:
  • Method Details

    • connect

      Future<Connection> connect(String host, int port) throws IOException
      Creates, initializes and connects socket to the specific remote host and port and returns Connection, representing socket.
      Parameters:
      host - remote host to connect to.
      port - remote port to connect to.
      Returns:
      Future of connect operation, which could be used to get resulting Connection.
      Throws:
      IOException - not actually thrown