Class ManagedSelector.Acceptor

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.channels.SelectableChannel _channel  
      private java.nio.channels.SelectionKey _key  
    • Constructor Summary

      Constructors 
      Constructor Description
      Acceptor​(java.nio.channels.SelectableChannel channel)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.Runnable onSelected()
      Callback method invoked when a read or write events has been detected by the ManagedSelector for this endpoint.
      void replaceKey​(java.nio.channels.SelectionKey newKey)
      Callback method invoked when the SelectionKey is replaced because the channel has been moved to a new selector.
      void update​(java.nio.channels.Selector selector)  
      void updateKey()
      Callback method invoked when all the keys selected by the ManagedSelector for this endpoint have been processed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _channel

        private final java.nio.channels.SelectableChannel _channel
      • _key

        private java.nio.channels.SelectionKey _key
    • Constructor Detail

      • Acceptor

        Acceptor​(java.nio.channels.SelectableChannel channel)
    • Method Detail

      • replaceKey

        public void replaceKey​(java.nio.channels.SelectionKey newKey)
        Description copied from interface: ManagedSelector.Selectable
        Callback method invoked when the SelectionKey is replaced because the channel has been moved to a new selector.
        Specified by:
        replaceKey in interface ManagedSelector.Selectable
        Parameters:
        newKey - the new SelectionKey
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException