Interface NioTask<C extends java.nio.channels.SelectableChannel>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void channelReady​(C ch, java.nio.channels.SelectionKey key)
      Invoked when the SelectableChannel has been selected by the Selector.
      void channelUnregistered​(C ch, java.lang.Throwable cause)
      Invoked when the SelectionKey of the specified SelectableChannel has been cancelled and thus this NioTask will not be notified anymore.
    • Method Detail

      • channelReady

        void channelReady​(C ch,
                          java.nio.channels.SelectionKey key)
                   throws java.lang.Exception
        Invoked when the SelectableChannel has been selected by the Selector.
        Throws:
        java.lang.Exception
      • channelUnregistered

        void channelUnregistered​(C ch,
                                 java.lang.Throwable cause)
                          throws java.lang.Exception
        Invoked when the SelectionKey of the specified SelectableChannel has been cancelled and thus this NioTask will not be notified anymore.
        Parameters:
        cause - the cause of the unregistration. null if a user called SelectionKey.cancel() or the event loop has been shut down.
        Throws:
        java.lang.Exception