Top Description Methods
org.xnio

public Interface ChannelDestination<T extends Channel>

Type Parameters
<T>
the channel type
Imports
java.nio.channels.Channel, org.xnio.channels.BoundChannel

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

Modifier and TypeMethod and Description
public IoFuture<? extends T>

Returns:

the future connection
accept
(ChannelListener<? super T>
the listener which will be notified when the channel is open, or null for none
openListener
,
ChannelListener<? super BoundChannel>
the listener which will be notified when the channel is bound locally, or null for none
bindListener
)

Accept a connection.

Method Detail

acceptback to summary
public IoFuture<? extends T> accept(ChannelListener<? super T> openListener, ChannelListener<? super BoundChannel> 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:ChannelListener<? super T>

the listener which will be notified when the channel is open, or null for none

bindListener:ChannelListener<? super BoundChannel>

the listener which will be notified when the channel is bound locally, or null for none

Returns:IoFuture<? extends T>

the future connection