Class Handshake.Producer

  • All Implemented Interfaces:
    java.lang.Runnable, Operation
    Enclosing class:
    Handshake

    private class Handshake.Producer
    extends Phase
    The Producer is used to schedule the negotiation for a write operation. This allows the negotiation to send any messages generated during the negotiation asynchronously. Once this has completed then it will resume the negotiation.
    • Constructor Detail

      • Producer

        public Producer​(Negotiation state,
                        Reactor reactor,
                        Trace trace)
        Constructor for the Producer task. This is used to create a task which will schedule a write 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 Detail

      • ready

        protected boolean ready()
                         throws java.io.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:
        java.io.IOException