XNIO API 2.1.0.CR2

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

Type Parameters:
A - the address type
T - the channel type
All Known Subinterfaces:
TcpAcceptor

public interface Acceptor<A,T extends 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
 IoFuture<T> acceptTo(A dest, ChannelListener<? super T> openListener, ChannelListener<? super BoundChannel<A>> bindListener)
          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

IoFuture<T> acceptTo(A dest,
                     ChannelListener<? super T> openListener,
                     ChannelListener<? super BoundChannel<A>> bindListener)
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
openListener - the listener which will be notified when the channel is open, or null for none
bindListener - the listener which will be notified when the acceptor is bound, or null for none
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

XNIO API 2.1.0.CR2

Copyright © 2010 JBoss, a division of Red Hat, Inc.