Class AbstractPollingIoAcceptor.Acceptor

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    AbstractPollingIoAcceptor<S extends AbstractIoSession,​H>

    private class AbstractPollingIoAcceptor.Acceptor
    extends java.lang.Object
    implements java.lang.Runnable
    This class is called by the startupAcceptor() method and is placed into a NamePreservingRunnable class. It's a thread accepting incoming connections from clients. The loop is stopped when all the bound handlers are unbound.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Acceptor()  
    • Constructor Detail

      • Acceptor

        private Acceptor()
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • registerHandles

        private int registerHandles()
        Sets up the socket communications. Sets items such as:

        Blocking Reuse address Receive buffer size Bind to listen port Registers OP_ACCEPT for selector

      • unregisterHandles

        private int unregisterHandles​(java.util.Collection<AbstractIoAcceptor.AcceptorOperationFuture> cancelled)
        This method just checks to see if anything has been placed into the cancellation queue. The only thing that should be in the cancelQueue is CancellationRequest objects and the only place this happens is in the doUnbind() method.