public interface NioTask<C extends SelectableChannel>
NioEventLoop
when a SelectableChannel
becomes ready.Modifier and Type | Method and Description |
---|---|
void |
channelReady(C ch,
SelectionKey key)
Invoked when the
SelectableChannel has been selected by the Selector . |
void |
channelUnregistered(C ch,
Throwable cause)
Invoked when the
SelectionKey of the specified SelectableChannel has been cancelled and thus
this NioTask will not be notified anymore. |
void channelReady(C ch, SelectionKey key) throws Exception
SelectableChannel
has been selected by the Selector
.Exception
void channelUnregistered(C ch, Throwable cause) throws Exception
SelectionKey
of the specified SelectableChannel
has been cancelled and thus
this NioTask
will not be notified anymore.cause
- the cause of the unregistration. null
if a user called SelectionKey.cancel()
or
the event loop has been shut down.Exception
Copyright © 2008–2024 The Netty Project. All rights reserved.