Interface Negotiation

All Superinterfaces:
Operation, Runnable
All Known Implementing Classes:
Handshake

interface Negotiation extends Operation
The Negotiation interface is used to represent an SSL negotiation. When an operation can not be completed this will allow a task to perform asynchronous operations and resume the negotiation when those operations can be fulfilled.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is invoked when the negotiation is done and the next phase of the connection is to take place.
    boolean
    This is used to receive data from the other side.
    void
    This is used to resume the negotiation when an operation has completed.
    boolean
    This is used to send any messages the negotiation may have.

    Methods inherited from interface org.simpleframework.transport.reactor.Operation

    cancel, getChannel, getTrace

    Methods inherited from interface java.lang.Runnable

    run
  • Method Details

    • resume

      void resume() throws IOException
      This is used to resume the negotiation when an operation has completed. This will continue the decrypt and encrypt sequence of messages required to fulfil the negotiation.
      Throws:
      IOException
    • commit

      void commit() throws IOException
      This method is invoked when the negotiation is done and the next phase of the connection is to take place. This will typically be invoked when an SSL handshake or termination exchange has completed successfully.
      Throws:
      IOException
    • send

      boolean send() throws IOException
      This is used to send any messages the negotiation may have. If the negotiation can not send the information during its execution then this method will be executed when a select operation is signaled.
      Returns:
      this returns true when the message has been sent
      Throws:
      IOException
    • receive

      boolean receive() throws IOException
      This is used to receive data from the other side. If at any point during the negotiation a message is required that can not be read immediately this is used to asynchronously read the data when a select operation is signaled.
      Returns:
      this returns true when the message has been read
      Throws:
      IOException