Package org.glassfish.grizzly
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 initializingConnection, and optionally connect it to a specific local/remote address.- Author:
- Alexey Stashok
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Future<Connection>connect(E remoteAddress)Creates, initializes and establishesConnectionto the specificremoteAddress.Future<Connection>connect(E remoteAddress, E localAddress)Creates, initializesConnection, binds it to the specific local and remoteremoteAddress.voidconnect(E remoteAddress, E localAddress, CompletionHandler<Connection> completionHandler)Creates, initializesConnection, binds it to the specific local and remoteremoteAddress.voidconnect(E remoteAddress, CompletionHandler<Connection> completionHandler)Creates, initializes and establishesConnectionto the specificremoteAddress.
-
-
-
Method Detail
-
connect
Future<Connection> connect(E remoteAddress)
Creates, initializes and establishesConnectionto the specificremoteAddress.- Parameters:
remoteAddress- remote address to connect to- Returns:
Futureof connect operation, which could be used to get resultingConnection
-
connect
void connect(E remoteAddress, CompletionHandler<Connection> completionHandler)
Creates, initializes and establishesConnectionto the specificremoteAddress.- Parameters:
remoteAddress- remote address to connect tocompletionHandler-CompletionHandler
-
connect
Future<Connection> connect(E remoteAddress, E localAddress)
Creates, initializesConnection, binds it to the specific local and remoteremoteAddress.- Parameters:
remoteAddress- remote address to connect tolocalAddress- local address to bind aConnectionto- Returns:
Futureof connect operation, which could be used to get resultingConnection
-
connect
void connect(E remoteAddress, E localAddress, CompletionHandler<Connection> completionHandler)
Creates, initializesConnection, binds it to the specific local and remoteremoteAddress.- Parameters:
remoteAddress- remote address to connect tolocalAddress- local address to bind aConnectiontocompletionHandler-CompletionHandler
-
-