Package io.netty.channel.nio
Interface NioTask<C extends SelectableChannel>
public interface NioTask<C extends SelectableChannel>
An arbitrary task that can be executed by
NioEventLoop
when a SelectableChannel
becomes ready.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
channelReady
(C ch, SelectionKey key) Invoked when theSelectableChannel
has been selected by theSelector
.void
channelUnregistered
(C ch, Throwable cause) Invoked when theSelectionKey
of the specifiedSelectableChannel
has been cancelled and thus thisNioTask
will not be notified anymore.
-
Method Details
-
channelReady
Invoked when theSelectableChannel
has been selected by theSelector
.- Throws:
Exception
-
channelUnregistered
Invoked when theSelectionKey
of the specifiedSelectableChannel
has been cancelled and thus thisNioTask
will not be notified anymore.- Parameters:
cause
- the cause of the unregistration.null
if a user calledSelectionKey.cancel()
or the event loop has been shut down.- Throws:
Exception
-