Top Description Methods
io.netty.channel.nio

public Interface NioTask<C extends SelectableChannel>

Imports
java.nio.channels.SelectableChannel, .SelectionKey, .Selector

An arbitrary task that can be executed by NioEventLoop when a SelectableChannel becomes ready.
See Also
NioEventLoop#register(SelectableChannel, int, NioTask)

Method Summary

Modifier and TypeMethod and Description
public void
channelReady(C ch, SelectionKey key)

Invoked when the SelectableChannel has been selected by the Selector.

public void
channelUnregistered(C ch, Throwable
the cause of the unregistration. null if a user called SelectionKey#cancel() or the event loop has been shut down.
cause
)

Invoked when the SelectionKey of the specified SelectableChannel has been cancelled and thus this NioTask will not be notified anymore.

Method Detail

channelReadyback to summary
public void channelReady(C ch, SelectionKey key) throws Exception

Invoked when the SelectableChannel has been selected by the Selector.

channelUnregisteredback to summary
public void channelUnregistered(C ch, Throwable cause) throws Exception

Invoked when the SelectionKey of the specified SelectableChannel has been cancelled and thus this NioTask will not be notified anymore.

Parameters
cause:Throwable

the cause of the unregistration. null if a user called SelectionKey#cancel() or the event loop has been shut down.