|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.protocol.ClientChannel.BasicClientHandshakeStep
protected abstract class ClientChannel.BasicClientHandshakeStep
Abstract class with common or some default logic for client handshake steps.
ClientChannel.setHandshakePhase(ClientHandshakeStep)
,
ClientChannel.onOpen()
Field Summary | |
---|---|
protected ILogger |
log
|
protected Message |
theRequest
|
protected java.lang.Object |
theRequestRefId
|
Constructor Summary | |
---|---|
protected |
ClientChannel.BasicClientHandshakeStep()
|
Method Summary | |
---|---|
protected boolean |
checkReferenceId(Message event)
Its an utility method to be used from particular steps implementations in ClientChannel.ClientHandshakeStep.handleMessage(Message) to compare incoming message ReferenceID
with ReferenceID of the request sent by initState() . |
protected ClientChannel.ClientHandshakeStep |
getNextStep()
Creates and returns instance of the next handshake step. |
protected ClientChannel.ClientHandshakeStep |
gotoNextStep()
Gets instance of the next step with virtual getNextStep() . |
ClientChannel.ClientHandshakeStep |
initState()
Default implementation of this interface method is very simple. It gets new instance of the request message, sends it and returns self reference to be called when server response arrived. |
protected ClientChannel.ClientHandshakeStep |
passEventDirectly(Message event)
Its an utility method to be used from particular steps implementations in ClientChannel.ClientHandshakeStep.handleMessage(Message) to enqueue and later pass unsolicited protocol messages
to user code after handshake finished and the channel set as "Opened". |
protected ClientChannel.ClientHandshakeStep |
passEventThrough(Message event)
Its an utility method to be used from particular steps implementations in ClientChannel.ClientHandshakeStep.handleMessage(Message) to enqueue and later pass unsolicited protocol messages
to user code after handshake finished and the channel set as "Opened". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.genesyslab.platform.commons.protocol.ClientChannel.ClientHandshakeStep |
---|
getRegistrationRequest, handleMessage |
Field Detail |
---|
protected final ILogger log
protected Message theRequest
protected java.lang.Object theRequestRefId
Constructor Detail |
---|
protected ClientChannel.BasicClientHandshakeStep()
Method Detail |
---|
public ClientChannel.ClientHandshakeStep initState() throws ProtocolException
initState
in interface ClientChannel.ClientHandshakeStep
null
if there is no need to wait for any server response
(handshake successfully finished).
ProtocolException
- in case of problem on send of the request message.ClientChannel.ClientHandshakeStep.getRegistrationRequest()
protected boolean checkReferenceId(Message event)
ClientChannel.ClientHandshakeStep.handleMessage(Message)
to compare incoming message ReferenceID
with ReferenceID of the request sent by initState()
.
event
- incoming protocol message.
protected ClientChannel.ClientHandshakeStep passEventThrough(Message event) throws ProtocolException
ClientChannel.ClientHandshakeStep.handleMessage(Message)
to enqueue and later pass unsolicited protocol messages
to user code after handshake finished and the channel set as "Opened".
This method checks deliverMessagesWhileHandshake
flag.
It delivers given event to application or throws exception if this feature is not enabled
(by default it is not enabled).
event
- incoming message to be passed to user code.
ProtocolException
- if the channel rejected the unsolicited message.
See the exception message for details.passEventDirectly(Message)
protected ClientChannel.ClientHandshakeStep passEventDirectly(Message event)
ClientChannel.ClientHandshakeStep.handleMessage(Message)
to enqueue and later pass unsolicited protocol messages
to user code after handshake finished and the channel set as "Opened".
event
- incoming message to be passed to user code.
java.lang.IllegalStateException
- if the channel rejected the unsolicited message.
See the exception message for details.passEventThrough(Message)
protected ClientChannel.ClientHandshakeStep gotoNextStep() throws ProtocolException
getNextStep()
.
Then it initializes the next step (if it is not null).null
if next step is null or its initialization method
returned null.
ProtocolException
- in case of error in initialization of the next step
or problem on send of the next request message.getNextStep()
protected ClientChannel.ClientHandshakeStep getNextStep()
gotoNextStep()
before return
from ClientChannel.ClientHandshakeStep.handleMessage(Message)
or initState()
.
Default implementation returns null
.
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |