org.jboss.xnio.nio
Class NioTcpAcceptor
java.lang.Object
org.jboss.xnio.nio.NioTcpAcceptor
- All Implemented Interfaces:
- java.io.Closeable, Acceptor<java.net.SocketAddress,TcpChannel>, CloseableTcpAcceptor, TcpAcceptor
public final class NioTcpAcceptor
- extends java.lang.Object
- implements CloseableTcpAcceptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
acceptTo
public FutureConnection<java.net.SocketAddress,TcpChannel> acceptTo(java.net.SocketAddress dest,
IoHandler<? super TcpChannel> handler)
- Description copied from interface:
Acceptor
- Accept a connection at a destination address. If a wildcard address is specified, then a destination address
is chosen in a manner specific to the OS and/or channel type.
- Specified by:
acceptTo
in interface Acceptor<java.net.SocketAddress,TcpChannel>
- Parameters:
dest
- the destination addresshandler
- the handler for the new connection
- Returns:
- the future connection
createChannelDestination
public TcpChannelDestination createChannelDestination(java.net.SocketAddress dest)
- Description copied from interface:
TcpAcceptor
- Create a channel destination for this acceptor, which always uses a specific destination address. If a wildcard
address is specified, then a destination address is chosen in a manner specific to the OS and/or channel type for
each accept operation.
- Specified by:
createChannelDestination
in interface Acceptor<java.net.SocketAddress,TcpChannel>
- Specified by:
createChannelDestination
in interface TcpAcceptor
- Parameters:
dest
- the destination address
- Returns:
- a channel destination instance
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object