Package org.simpleframework.transport
Interface Negotiation
-
- All Superinterfaces:
Operation
,java.lang.Runnable
- All Known Implementing Classes:
Handshake
interface Negotiation extends Operation
TheNegotiation
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
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 Detail
-
resume
void resume() throws java.io.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:
java.io.IOException
-
commit
void commit() throws java.io.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:
java.io.IOException
-
send
boolean send() throws java.io.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:
java.io.IOException
-
receive
boolean receive() throws java.io.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:
java.io.IOException
-
-