Class AcceptorLazyImpl

All Implemented Interfaces:
LegacyServerSocketEndPointInfo, Work, Acceptor, EventHandler, SocketInfo

public class AcceptorLazyImpl extends AcceptorBase
A version of an Acceptor that does not own the ServerSocket. Instead, SelectableChannels obtained from the ServerSocket are given to the processSocket method
  • Constructor Details

    • AcceptorLazyImpl

      public AcceptorLazyImpl(ORB orb, int port, String name, String type)
  • Method Details

    • isLazy

      public boolean isLazy()
      Specified by:
      isLazy in interface Acceptor
      Overrides:
      isLazy in class AcceptorBase
    • getAcceptedSocket

      public Socket getAcceptedSocket()
      Description copied from interface: Acceptor
      Blocks until a new Socket is available on the acceptor's port.
      Returns:
      the new socket
    • getChannel

      public SelectableChannel getChannel()
    • initialize

      public boolean initialize()
      Description copied from interface: Acceptor
      Used to initialize an Acceptor. For example, initialization may mean to create a ServerSocketChannel. Note: this must be prepared to be be called multiple times.
      Returns:
      true when it performs initializatin actions (typically the first call.
    • close

      public void close()
      Description copied from interface: Acceptor
      Close the Acceptor.
    • getServerSocket

      public ServerSocket getServerSocket()
    • doWork

      public void doWork()
      Description copied from interface: Work
      This method denotes the actual work that is done by the work item.
    • shouldRegisterAcceptEvent

      public boolean shouldRegisterAcceptEvent()
      Description copied from interface: Acceptor
      Used to determine if the Acceptor should register with a Selector to handle accept events. For example, this may be false in the case of Solaris Doors which do not actively listen.
      Specified by:
      shouldRegisterAcceptEvent in interface Acceptor
      Overrides:
      shouldRegisterAcceptEvent in class AcceptorBase
      Returns:
      true if the Acceptor should be registered with a Selector.