Package org.glassfish.grizzly
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 initializingConnection, and optionally connect is to a specific local/remote address.- Author:
- Alexey Stashok
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CONNECTION_TIMEOUT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Future<Connection>connect(String host, int port)Creates, initializes and connects socket to the specific remote host and port and returnsConnection, representing socket.-
Methods inherited from interface org.glassfish.grizzly.ConnectorHandler
connect, connect, connect, connect
-
-
-
-
Field Detail
-
DEFAULT_CONNECTION_TIMEOUT
static final int DEFAULT_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
connect
Future<Connection> connect(String host, int port) throws IOException
Creates, initializes and connects socket to the specific remote host and port and returnsConnection, representing socket.- Parameters:
host- remote host to connect to.port- remote port to connect to.- Returns:
Futureof connect operation, which could be used to get resultingConnection.- Throws:
IOException- not actually thrown
-
-