Top Description Methods
org.xnio.channels

public Interface SimpleAcceptingChannel<C extends CloseableChannel>

extends SuspendableAcceptChannel
Known Direct Subinterfaces
org.xnio.channels.AcceptingChannel
Type Parameters
<C>
the channel type
Imports
java.io.IOException, org.xnio.ChannelListener

A channel which can accept connections.
Author
David M. Lloyd

Method Summary

Modifier and TypeMethod and Description
public C

Returns:

the new connection, or null if none is available
accept
()

Attempt to accept a connection.

public ChannelListener.Setter<? extends SimpleAcceptingChannel<C>>
getAcceptSetter()

Redeclares org.xnio.channels.SuspendableAcceptChannel.getAcceptSetter.

Get the setter which can be used to change the accept listener for this channel.

public ChannelListener.Setter<? extends SimpleAcceptingChannel<C>>
getCloseSetter()

Redeclares org.xnio.channels.SuspendableAcceptChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel.

Inherited from org.xnio.channels.SuspendableAcceptChannel:
awaitAcceptableawaitAcceptablegetAcceptThreadgetIoThreadisAcceptResumedresumeAcceptssuspendAcceptswakeupAccepts

Method Detail

acceptback to summary
public C accept() throws IOException

Attempt to accept a connection.

Returns:C

the new connection, or null if none is available

Exceptions
IOException:
if an I/O error occurs
getAcceptSetterback to summary
public ChannelListener.Setter<? extends SimpleAcceptingChannel<C>> getAcceptSetter()

Redeclares org.xnio.channels.SuspendableAcceptChannel.getAcceptSetter.

Doc from org.xnio.channels.SuspendableAcceptChannel.getAcceptSetter.

Get the setter which can be used to change the accept listener for this channel.

Returns:ChannelListener.Setter<? extends SimpleAcceptingChannel<C>>

the setter

getCloseSetterback to summary
public ChannelListener.Setter<? extends SimpleAcceptingChannel<C>> getCloseSetter()

Redeclares org.xnio.channels.SuspendableAcceptChannel.getCloseSetter.

Doc from org.xnio.channels.SuspendableAcceptChannel.getCloseSetter.

Get the setter which can be used to change the close listener for this channel. If the channel is already closed, then the listener will not be called.

Returns:ChannelListener.Setter<? extends SimpleAcceptingChannel<C>>

Doc from org.xnio.channels.CloseableChannel.getCloseSetter.

the setter