public class RecyclableSocketChannelAcceptor extends Object
RecyclableSocketChannelConnector.ChannelAcceptor.Listener| Constructor and Description |
|---|
RecyclableSocketChannelAcceptor(IOExecutor executor,
SocketAddress localAddress) |
RecyclableSocketChannelAcceptor(IOExecutor executor,
SocketAddress localAddress,
ServerSocket serverSocket) |
| Modifier and Type | Method and Description |
|---|---|
Channel |
accept()
Blocks until a channel is accepted.
|
void |
accept(ChannelAcceptor.Listener listener)
Register a listener which is asynchronously given an accepted channel.
|
Channel |
accept(long timeout,
TimeUnit unit)
Blocks until a channel is accepted.
|
Channel |
accept(Timer timer)
Blocks until a channel is accepted.
|
void |
close()
Prevents new channels from being accepted and closes all accepted
channels.
|
protected IOExecutor |
executor() |
SocketAddress |
getLocalAddress() |
String |
toString() |
public RecyclableSocketChannelAcceptor(IOExecutor executor, SocketAddress localAddress) throws IOException
IOExceptionpublic RecyclableSocketChannelAcceptor(IOExecutor executor, SocketAddress localAddress, ServerSocket serverSocket) throws IOException
IOExceptionpublic Channel accept() throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic Channel accept(long timeout, TimeUnit unit) throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic Channel accept(Timer timer) throws IOException
ChannelAcceptoraccept in interface ChannelAcceptorIOExceptionpublic void accept(ChannelAcceptor.Listener listener)
ChannelAcceptoraccept in interface ChannelAcceptorpublic void close()
ChannelAcceptorclose in interface Closeableclose in interface AutoCloseableclose in interface ChannelAcceptorpublic final SocketAddress getLocalAddress()
getLocalAddress in interface ChannelAcceptorprotected IOExecutor executor()
Copyright © 2006–2015 Cojen. All rights reserved.