Class: BridgeEvent

vertx-web-js/bridge_event~ BridgeEvent

new BridgeEvent()

Represents an event that occurs on the event bus bridge.

Please consult the documentation for a full explanation.

Source:

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
Source:

future() → {Future}

Source:
Returns:
the associated with this promise, it can be used to be aware of the promise completion
Type
Future

setRawMessage(message) → {BridgeEvent}

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
Source:
Returns:
this reference, so it can be used fluently
Type
BridgeEvent

socket() → {SockJSSocket}

Get the SockJSSocket instance corresponding to the event
Source:
Returns:
the SockJSSocket instance
Type
SockJSSocket

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
Source:
Returns:
false when the future is already completed
Type
boolean