Class: VertxStomp::ServerFrame
- Inherits:
-
Object
- Object
- VertxStomp::ServerFrame
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb
Overview
Structure passed to server handler when receiving a frame. It provides a reference on the received => Object}
but also on the StompServerConnection.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (::VertxStomp::StompServerConnection) connection
The connection.
-
- (Hash{String => Object}) frame
The received frame.
Class Method Details
+ (Boolean) accept?(obj)
20 21 22 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 20 def @@j_api_type.accept?(obj) obj.class == ServerFrame end |
+ (Object) j_api_type
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 29 def self.j_api_type @@j_api_type end |
+ (Object) j_class
32 33 34 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 32 def self.j_class Java::IoVertxExtStomp::ServerFrame.java_class end |
+ (Object) unwrap(obj)
26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 26 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 23 def @@j_api_type.wrap(obj) ServerFrame.new(obj) end |
Instance Method Details
- (::VertxStomp::StompServerConnection) connection
Returns the connection
37 38 39 40 41 42 43 44 45 46 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 37 def connection if !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:connection, []).call(),::VertxStomp::StompServerConnection) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling connection()" end end |
- (Hash{String => Object}) frame
Returns the received frame
49 50 51 52 53 54 55 56 57 58 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/server_frame.rb', line 49 def frame if !block_given? return @j_del.java_method(:frame, []).call() != nil ? JSON.parse(@j_del.java_method(:frame, []).call().toJson.encode) : nil end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling frame()" end end |