XNIO API 2.0.2.GA

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

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

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

A channel destination. This is the inverse of ChannelSource; it is used to accept a single connection from a remote peer.

Since:
1.2

Method Summary
 IoFuture<T> accept(ChannelListener<? super T> openListener, ChannelListener<? super BoundChannel<A>> bindListener)
          Accept a connection.
 

Method Detail

accept

IoFuture<T> accept(ChannelListener<? super T> openListener,
                   ChannelListener<? super BoundChannel<A>> bindListener)
Accept a connection. The bind listener will be called when the channel is bound; the open listener will be called when the connection is accepted. It is not guaranteed that the open listener will be called after the bind listener.

Parameters:
openListener - the handler which will be notified when the channel is open, or null for none
bindListener - the handler which will be notified when the channel is bound locally, or null for none
Returns:
the future connection

XNIO API 2.0.2.GA

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