java.lang.Object
io.deephaven.enterprise.comm.sched.Job
io.deephaven.enterprise.niowrapper.sched.Acceptor
All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable

public class Acceptor extends Job implements com.fishlib.base.log.LogOutputAppendable
This class creates new IOJobs by listening for incoming connections on a ServerSocket. Created by IntelliJ IDEA. User: jrauser Date: Sep 26, 2006 Time: 7:58:40 PM To change this template use File | Settings | File Templates.
  • Constructor Details

  • Method Details

    • getSocket

      public ServerSocketChannel getSocket()
      Returns the acceptor's server socket.
    • getAddress

      public InetSocketAddress getAddress()
      Returns the inet address on which the acceptor's server socket is listening.
    • getIOParameters

      public IOParameters getIOParameters()
      Returns the acceptor's IOParameters
    • append

      public com.fishlib.base.log.LogOutput append(com.fishlib.base.log.LogOutput logOutput)
      Append this acceptor to a log
      Specified by:
      append in interface com.fishlib.base.log.LogOutputAppendable
      Overrides:
      append in class Job
    • shutdown

      public void shutdown()
      Shut down the listener, cancelling it's job and closing the scheduler.
    • invoke

      public int invoke(SelectableChannel channel, int readyOps, com.fishlib.base.Procedure.Nullary handoff) throws IOException
      Accept new connections when invoked by the scheduler.
      Specified by:
      invoke in class Job
      Parameters:
      channel - the channel which has become ready
      readyOps - the operations which can be performed on this channel without blocking
      Returns:
      the modified readyOps after the invocation; if non-zero, the job will be invoked again with these
      Throws:
      IOException - - if something bad happens
    • cancelled

      public void cancelled()
      clean up when we are cancelled from the scheduler.
      Specified by:
      cancelled in class Job
    • timedOut

      public void timedOut()
      clean up the scheduler detects a timeout on the acceptor.
      Specified by:
      timedOut in class Job