org.jboss.xnio
Interface Acceptor<A,T extends java.nio.channels.Channel>

Type Parameters:
A - the address type
T - the channel type
All Known Subinterfaces:
CloseableTcpAcceptor, TcpAcceptor
All Known Implementing Classes:
NioTcpAcceptor

public interface Acceptor<A,T extends java.nio.channels.Channel>

An acceptor. This is the inverse of Connector; it is used to accept a single connection from a remote peer.

Since:
1.2

Method Summary
 FutureConnection<A,T> acceptTo(A dest, IoHandler<? super T> handler)
          Accept a connection at a destination address.
 ChannelDestination<A,T> createChannelDestination(A dest)
          Create a channel destination for this acceptor, which always uses a specific destination address.
 

Method Detail

acceptTo

FutureConnection<A,T> acceptTo(A dest,
                               IoHandler<? super T> handler)
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.

Parameters:
dest - the destination address
handler - the handler for the new connection
Returns:
the future connection

createChannelDestination

ChannelDestination<A,T> createChannelDestination(A dest)
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.

Parameters:
dest - the destination address
Returns:
a channel destination instance