Package io.netty.channel.nio
Interface NioTask<C extends java.nio.channels.SelectableChannel>
-
public interface NioTask<C extends java.nio.channels.SelectableChannel>An arbitrary task that can be executed byNioEventLoopwhen aSelectableChannelbecomes ready.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidchannelReady(C ch, java.nio.channels.SelectionKey key)Invoked when theSelectableChannelhas been selected by theSelector.voidchannelUnregistered(C ch, java.lang.Throwable cause)Invoked when theSelectionKeyof the specifiedSelectableChannelhas been cancelled and thus thisNioTaskwill not be notified anymore.
-
-
-
Method Detail
-
channelReady
void channelReady(C ch, java.nio.channels.SelectionKey key) throws java.lang.Exception
Invoked when theSelectableChannelhas been selected by theSelector.- Throws:
java.lang.Exception
-
channelUnregistered
void channelUnregistered(C ch, java.lang.Throwable cause) throws java.lang.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:
java.lang.Exception
-
-