org.glassfish.grizzly.nio.transport
Class TCPNIOConnectorHandler
java.lang.Object
org.glassfish.grizzly.AbstractSocketConnectorHandler
org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler
- All Implemented Interfaces:
- SocketConnectorHandler
public class TCPNIOConnectorHandler
- extends AbstractSocketConnectorHandler
TCP NIO transport client side ConnectorHandler implementation
- Author:
- Alexey Stashok
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_CONNECTION_TIMEOUT
protected static final int DEFAULT_CONNECTION_TIMEOUT
- See Also:
- Constant Field Values
isReuseAddress
protected boolean isReuseAddress
connectionTimeout
protected int connectionTimeout
TCPNIOConnectorHandler
public TCPNIOConnectorHandler(TCPNIOTransport transport)
connect
public Future<Connection> connect(SocketAddress remoteAddress,
SocketAddress localAddress)
throws IOException
- Description copied from interface:
SocketConnectorHandler
- Creates, initializes socket, binds it to the specific local and remote
SocketAddress and returns Connection, representing socket.
- Specified by:
connect in interface SocketConnectorHandler- Specified by:
connect in class AbstractSocketConnectorHandler
- Parameters:
remoteAddress - remote address to connect to.localAddress - local address to bind socket to.
- Returns:
Future of connect operation, which could be used to get
resulting Connection.
- Throws:
IOException
connectSync
protected Future<Connection> connectSync(SocketAddress remoteAddress,
SocketAddress localAddress)
throws IOException
- Throws:
IOException
connectAsync
protected Future<Connection> connectAsync(SocketAddress remoteAddress,
SocketAddress localAddress)
throws IOException
- Throws:
IOException
isReuseAddress
public boolean isReuseAddress()
setReuseAddress
public void setReuseAddress(boolean isReuseAddress)
getConnectionTimeout
public int getConnectionTimeout()
setConnectionTimeout
public void setConnectionTimeout(int connectionTimeout)
waitNIOFuture
protected <E> E waitNIOFuture(Future<E> future)
throws IOException
- Throws:
IOException
Copyright © 2009 SUN Microsystems. All Rights Reserved.