CREventReceiver
This class extends CRStateMachine
It is used to receive events by means of the HTML EventSource interface
Contstructor
- CREventReceiver(config, clientRole)
-
Parameters
- config
- CRConfig object, required
- Configuration parameters and methods
- clientRole
- String, required
- The role of the client ("controller" or "responder")
Properties
See also CRStateMachine properties
- clientActive
- Boolean, writeOnly
- Indicates whether the client is active or not
- clientId
- String, writeOnly
- The current clientId
- accessToken
- String, writeOnly
- The current accessToken
Methods
See also CRStateMachine methods
- Init()
- Initiates dynamic variables and activates the object
Events
See also CRStateMachine events
- crEventReceived
- Delivers a CREvent object
States
- closed
-
The eventSource is closed, because the client is not active,
or because it has not been assigned the required properties,
or because the connection has been shut down.
- opening
-
The eventSource is opening.
- open
- The eventSource is open and able to receive events.
- closing
- The eventSource is closing.
- aborted
- The eventSource has been aborted for some reason, possibly indicated by the subState.