Package org.simpleframework.transport
Class Handshake.Consumer
java.lang.Object
org.simpleframework.transport.Phase
org.simpleframework.transport.Handshake.Consumer
- Enclosing class:
Handshake
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.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConsumer
(Negotiation state, Reactor reactor, Trace trace) Constructor for theConsumer
task. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
ready()
This method is used to determine if the task is ready.
-
Constructor Details
-
Consumer
Constructor for theConsumer
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 usedreactor
- this is the reactor used for I/O notificationstrace
- the trace that is used to monitor the handshake
-
-
Method Details
-
ready
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 classPhase
- Returns:
- this returns true when the task has completed
- Throws:
IOException
-