org.glassfish.grizzly
Interface SocketConnectorHandler

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

public interface SocketConnectorHandler
extends ConnectorHandler<java.net.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

Method Summary
 java.util.concurrent.Future<Connection> connect(java.lang.String host, int port)
          Creates, initializes and connects socket to the specific remote host and port and returns Connection, representing socket.
 
Methods inherited from interface org.glassfish.grizzly.ConnectorHandler
connect, connect, connect, connect
 

Method Detail

connect

java.util.concurrent.Future<Connection> connect(java.lang.String host,
                                                int port)
                                                throws java.io.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:
java.io.IOException


Copyright © 2011 Oracle Corpration. All Rights Reserved.