Package org.simpleframework.transport
Interface Negotiation
- All Known Implementing Classes:
Handshake
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 TypeMethodDescriptionvoid
commit()
This method is invoked when the negotiation is done and the next phase of the connection is to take place.boolean
receive()
This is used to receive data from the other side.void
resume()
This is used to resume the negotiation when an operation has completed.boolean
send()
This is used to send any messages the negotiation may have.Methods inherited from interface org.simpleframework.transport.reactor.Operation
cancel, getChannel, getTrace
-
Method Details
-
resume
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
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
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
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
-