Class: VertxWeb::BridgeEvent
- Inherits:
-
Vertx::Future
- Object
- Vertx::Future
- VertxWeb::BridgeEvent
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/bridge_event.rb
Overview
Represents an event that occurs on the event bus bridge.
Please consult the documentation for a full explanation.
Instance Method Summary (collapse)
-
- (Hash{String => Object}) raw_message
Get the raw JSON message for the event.
-
- (::VertxWeb::SockJSSocket) socket
Get the SockJSSocket instance corresponding to the event.
-
- (:SOCKET_CREATED, ...) type
@return the type of the event.
Instance Method Details
- (Hash{String => Object}) raw_message
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.
35 36 37 38 39 40 41 42 43 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/bridge_event.rb', line 35 def if !block_given? if @cached_raw_message != nil return @cached_raw_message end return @cached_raw_message = @j_del.java_method(:rawMessage, []).call() != nil ? JSON.parse(@j_del.java_method(:rawMessage, []).call().encode) : nil end raise ArgumentError, "Invalid arguments when calling raw_message()" end |
- (::VertxWeb::SockJSSocket) socket
Get the SockJSSocket instance corresponding to the event
46 47 48 49 50 51 52 53 54 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/bridge_event.rb', line 46 def socket if !block_given? if @cached_socket != nil return @cached_socket end return @cached_socket = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:socket, []).call(),::VertxWeb::SockJSSocket) end raise ArgumentError, "Invalid arguments when calling socket()" end |
- (:SOCKET_CREATED, ...) type
@return the type of the event
23 24 25 26 27 28 29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-web/src/main/resources/vertx-web/bridge_event.rb', line 23 def type if !block_given? if @cached_type != nil return @cached_type end return @cached_type = @j_del.java_method(:type, []).call().name.intern end raise ArgumentError, "Invalid arguments when calling type()" end |