Module io.netty5.transport
Package io.netty5.channel.nio
Interface NioTask<C extends SelectableChannel>
-
public interface NioTask<C extends SelectableChannel>An arbitrary task that can be executed byNioHandlerwhen aSelectableChannelbecomes ready.- See Also:
NioHandler#register(SelectableChannel, int, NioTask)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchannelReady(C ch, SelectionKey key)Invoked when theSelectableChannelhas been selected by theSelector.voidchannelUnregistered(C ch, Throwable cause)Invoked when theSelectionKeyof the specifiedSelectableChannelhas been cancelled and thus thisNioTaskwill not be notified anymore.
-
-
-
Method Detail
-
channelReady
void channelReady(C ch, SelectionKey key) throws Exception
Invoked when theSelectableChannelhas been selected by theSelector.- Throws:
Exception
-
channelUnregistered
void channelUnregistered(C ch, Throwable cause) throws Exception
Invoked when theSelectionKeyof the specifiedSelectableChannelhas been cancelled and thus thisNioTaskwill not be notified anymore.- Parameters:
cause- the cause of the unregistration.nullif a user calledSelectionKey.cancel()or the event loop has been shut down.- Throws:
Exception
-
-