Class ClientAcceptor

java.lang.Object
com.sshtools.synergy.nio.ClientAcceptor
Direct Known Subclasses:
SocketListeningForwardingChannelFactoryImpl

public abstract class ClientAcceptor extends Object
An abstract class for the NIO framework to accept client connections.
  • Constructor Details

    • ClientAcceptor

      public ClientAcceptor(ListeningInterface li)
      Construct an acceptor with a protocol context.
      Parameters:
      protocolContext - ProtocolContext
  • Method Details

    • finishAccept

      public void finishAccept(SelectionKey key)
      Called by the framework when the OP_ACCEPT event is fired for this acceptor.
      Parameters:
      key - SelectionKey
    • finishAccept

      public abstract boolean finishAccept(SelectionKey key, ListeningInterface li)
      Complete the accept operation.
      Parameters:
      key - SelectionKey
      protocolContext - ProtocolContext
      Returns:
      boolean
    • stopAccepting

      public abstract void stopAccepting() throws IOException
      Stop accepting clients
      Throws:
      IOException