Class: VertxStomp::Acknowledgement
- Inherits:
-
Object
- Object
- VertxStomp::Acknowledgement
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb
Overview
Structure passed to acknowledgement handler called when a
ACK
or NACK
frame is received. The handler
receives an instance of Acknowledgement with the subscription Hash and the impacted messages. The
list of messages depends on the type of acknowledgment used by the subscription.
Subscriptions using the client
mode receives all messages that were waiting for acknowledgment that were
sent before the acknowledged messages. The list also contains the acknowledged message. This is a cumulative
acknowledgement. Subscriptions using the client-individual
mode receives a singleton list containing only
the acknowledged message.
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)
-
- (Array<Hash>) frames
The list of frames that have been acknowledged / not-acknowledged.
-
- (Hash) subscription
The subscription frame.
Class Method Details
+ (Boolean) accept?(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 24 def @@j_api_type.accept?(obj) obj.class == Acknowledgement end |
+ (Object) j_api_type
33 34 35 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 33 def self.j_api_type @@j_api_type end |
+ (Object) j_class
36 37 38 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 36 def self.j_class Java::IoVertxExtStomp::Acknowledgement.java_class end |
+ (Object) unwrap(obj)
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 30 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 27 def @@j_api_type.wrap(obj) Acknowledgement.new(obj) end |
Instance Method Details
- (Array<Hash>) frames
Returns the list of frames that have been acknowledged / not-acknowledged. The content of the list depends on the type of subscription.
47 48 49 50 51 52 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 47 def frames if !block_given? return @j_del.java_method(:frames, []).call().to_a.map { |elt| elt != nil ? JSON.parse(elt.toJson.encode) : nil } end raise ArgumentError, "Invalid arguments when calling frames()" end |
- (Hash) subscription
Returns the subscription frame
40 41 42 43 44 45 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-stomp/acknowledgement.rb', line 40 def subscription if !block_given? return @j_del.java_method(:subscription, []).call() != nil ? JSON.parse(@j_del.java_method(:subscription, []).call().toJson.encode) : nil end raise ArgumentError, "Invalid arguments when calling subscription()" end |