Class Handshake.Consumer

java.lang.Object
org.simpleframework.transport.Phase
org.simpleframework.transport.Handshake.Consumer
All Implemented Interfaces:
Runnable, Operation
Enclosing class:
Handshake

private class Handshake.Consumer extends Phase
The Consumer task is used to schedule the negotiation for a read operation. This allows the negotiation to receive any messages generated by the client asynchronously. Once this has completed then it will resume the negotiation.
  • Constructor Details

    • Consumer

      public Consumer(Negotiation state, Reactor reactor, Trace trace)
      Constructor for the Consumer task. This is used to create a task which will schedule a read operation for the negotiation. When the operation completes this will resume the negotiation.
      Parameters:
      state - this is the negotiation object that is used
      reactor - this is the reactor used for I/O notifications
      trace - the trace that is used to monitor the handshake
  • Method Details

    • ready

      protected boolean ready() throws IOException
      This method is used to determine if the task is ready. This is executed when the select operation is signalled. When this is true the the task completes. If not then this will schedule the task again for the specified select operation.
      Overrides:
      ready in class Phase
      Returns:
      this returns true when the task has completed
      Throws:
      IOException