Class AbstractPollingIoAcceptor.Acceptor

java.lang.Object
org.apache.mina.core.polling.AbstractPollingIoAcceptor.Acceptor
All Implemented Interfaces:
Runnable
Enclosing class:
AbstractPollingIoAcceptor<S extends AbstractIoSession, H>

private class AbstractPollingIoAcceptor.Acceptor extends Object implements 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 Details

    • Acceptor

      private Acceptor()
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface 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(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.