public class RecyclableSocketChannelConnector extends Object
RecyclableSocketChannelAcceptor.ChannelConnector.Listener| Constructor and Description |
|---|
RecyclableSocketChannelConnector(IOExecutor executor,
SocketAddress remoteAddress) |
RecyclableSocketChannelConnector(IOExecutor executor,
SocketAddress remoteAddress,
SocketAddress localAddress) |
RecyclableSocketChannelConnector(IOExecutor executor,
SocketAddress remoteAddress,
SocketAddress localAddress,
SocketFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Prevents new channels from being connected and closes all connected
channels.
|
Channel |
connect()
Returns a new channel, possibly blocking until it has been established.
|
void |
connect(ChannelConnector.Listener listener)
Register a listener which is asynchronously given a connected channel.
|
Channel |
connect(long timeout,
TimeUnit unit)
Returns a new channel, possibly blocking until it has been established.
|
Channel |
connect(Timer timer)
Returns a new channel, possibly blocking until it has been established.
|
protected IOExecutor |
executor() |
SocketAddress |
getLocalAddress() |
SocketAddress |
getRemoteAddress() |
String |
toString() |
public RecyclableSocketChannelConnector(IOExecutor executor, SocketAddress remoteAddress)
remoteAddress - address to connect topublic RecyclableSocketChannelConnector(IOExecutor executor, SocketAddress remoteAddress, SocketAddress localAddress)
remoteAddress - address to connect tolocalAddress - local address to bind to; pass null for anypublic RecyclableSocketChannelConnector(IOExecutor executor, SocketAddress remoteAddress, SocketAddress localAddress, SocketFactory factory)
remoteAddress - address to connect tolocalAddress - local address to bind to; pass null for anypublic Channel connect() throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic Channel connect(long timeout, TimeUnit unit) throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic Channel connect(Timer timer) throws IOException
ChannelConnectorconnect in interface ChannelConnectorIOExceptionpublic void connect(ChannelConnector.Listener listener)
ChannelConnectorconnect in interface ChannelConnectorpublic void close()
ChannelConnectorclose in interface Closeableclose in interface AutoCloseableclose in interface ChannelConnectorpublic final SocketAddress getRemoteAddress()
getRemoteAddress in interface ChannelConnectorpublic final SocketAddress getLocalAddress()
getLocalAddress in interface ChannelConnectorprotected IOExecutor executor()
Copyright © 2006–2015 Cojen. All rights reserved.