Top Description Fields Methods
org.glassfish.grizzly

public Interface SocketConnectorHandler

extends ConnectorHandler<SocketAddress>
Known Direct Implementers
org.glassfish.grizzly.nio.NIOTransport, org.glassfish.grizzly.AbstractSocketConnectorHandler
Imports
java.io.IOException, java.net.SocketAddress, java.util.concurrent.Future

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 Summary

Modifier and TypeField and Description
public static final int

Method Summary

Modifier and TypeMethod and Description
public Future<Connection<L>>

Returns:

Future of connect operation, which could be used to get resulting Connection.
connect
(String
remote host to connect to.
host
,
int
remote port to connect to.
port
)

Redeclares org.glassfish.grizzly.ConnectorHandler.connect.

Creates, initializes and connects socket to the specific remote host and port and returns Connection, representing socket.

Inherited from org.glassfish.grizzly.ConnectorHandler:
connectconnectconnect

Field Detail

DEFAULT_CONNECTION_TIMEOUTback to summary
public static final int DEFAULT_CONNECTION_TIMEOUT

Method Detail

connectback to summary
public Future<Connection<L>> connect(String host, int port) throws IOException

Redeclares org.glassfish.grizzly.ConnectorHandler.connect.

Creates, initializes and connects socket to the specific remote host and port and returns Connection, representing socket.

Parameters
host:String

remote host to connect to.

port:int

remote port to connect to.

Returns:Future<Connection<L>>

Future of connect operation, which could be used to get resulting Connection.

Exceptions
IOException:
not actually thrown