Top Description Fields Methods
org.xnio.channels

public Interface CloseableChannel

extends InterruptibleChannel, Configurable
Known Direct Subinterfaces
org.xnio.channels.BoundChannel, org.xnio.channels.SuspendableAcceptChannel, org.xnio.channels.SuspendableChannel, org.xnio.channels.SuspendableReadChannel, org.xnio.channels.SuspendableWriteChannel
Known Direct Implementers
org.xnio.Connection, org.xnio.channels.AssembledChannel
Imports
java.io.IOException, java.nio.channels.InterruptibleChannel, org.xnio.ChannelListener, .XnioIoThread, .XnioWorker

A channel which is closeable. A listener may be registered which is triggered (only once) on channel close.
Since
2.0

Field Summary

Inherited from org.xnio.channels.Configurable:
EMPTY

Method Summary

Modifier and TypeMethod and Description
public void
close()

Redeclares java.nio.channels.InterruptibleChannel.close.

Close this channel.

public ChannelListener.Setter<? extends CloseableChannel>

Returns:

the setter
getCloseSetter
()

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

public XnioIoThread

Returns:

the I/O thread associated with this channel
getIoThread
()

Get the I/O thread associated with this channel.

public XnioWorker

Returns:

the worker
getWorker
()

Get the worker for this channel.

Inherited from org.xnio.channels.Configurable:
getOptionsetOptionsupportsOption

Method Detail

closeback to summary
public void close() throws IOException

Redeclares java.nio.channels.InterruptibleChannel.close.

Close this channel. When a channel is closed, its close listener is invoked. Invoking this method more than once has no additional effect.

Exceptions
IOException:
if the close failed
getCloseSetterback to summary
public ChannelListener.Setter<? extends CloseableChannel> 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 CloseableChannel>

the setter

getIoThreadback to summary
public XnioIoThread getIoThread()

Get the I/O thread associated with this channel.

Returns:XnioIoThread

the I/O thread associated with this channel

getWorkerback to summary
public XnioWorker getWorker()

Get the worker for this channel.

Returns:XnioWorker

the worker