new BaseBridgeEvent()
Represents an event that occurs on the event bus bridge.
Please consult the documentation for a full explanation.
Methods
complete(result)
Set the result. Any handler will be called, if there is one, and the promise will be marked as completed.
Any handler set on the associated promise will be called.
Parameters:
| Name | Type | Description |
|---|---|---|
result |
boolean | the result |
future() → {Future}
Returns:
the associated with this promise, it can be used to be aware of the promise completion
- Type
- Future
getRawMessage() → {Object}
Get the raw JSON message for the event. This will be null for SOCKET_CREATED or SOCKET_CLOSED events as there is
no message involved. If the returned message is modified, BaseBridgeEvent#setRawMessage should be called with the
new message.
Returns:
the raw JSON message for the event
- Type
- Object
setRawMessage(message) → {BaseBridgeEvent}
Get the raw JSON message for the event. This will be null for SOCKET_CREATED or SOCKET_CLOSED events as there is
no message involved.
Parameters:
| Name | Type | Description |
|---|---|---|
message |
Object | the raw message |
Returns:
this reference, so it can be used fluently
- Type
- BaseBridgeEvent
tryComplete(result) → {boolean}
Like Promise#complete but returns
false when the promise is already completed instead of throwing
an IllegalStateException, it returns true otherwise.
Parameters:
| Name | Type | Description |
|---|---|---|
result |
boolean | the result |
Returns:
false when the future is already completed
- Type
- boolean
type() → {Object}
Returns:
the type of the event
- Type
- Object