Class: VertxMqtt::MqttSubAckMessage

Inherits:
Object
  • Object
show all
Includes:
MqttMessage
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb

Overview

Represents an MQTT SUBACK message

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


19
20
21
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 19

def @@j_api_type.accept?(obj)
  obj.class == MqttSubAckMessage
end

+ (Object) j_api_type



28
29
30
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 28

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



31
32
33
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 31

def self.j_class
  Java::IoVertxMqttMessages::MqttSubAckMessage.java_class
end

+ (Object) unwrap(obj)



25
26
27
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 25

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



22
23
24
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 22

def @@j_api_type.wrap(obj)
  MqttSubAckMessage.new(obj)
end

Instance Method Details

- (Array<Fixnum>) granted_qo_s_levels

Returns list of granted QoS levels

Returns:

  • (Array<Fixnum>)
    list of granted QoS levels

Raises:

  • (ArgumentError)


45
46
47
48
49
50
51
52
53
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 45

def granted_qo_s_levels
  if !block_given?
    if @cached_granted_qo_s_levels != nil
      return @cached_granted_qo_s_levels
    end
    return @cached_granted_qo_s_levels = @j_del.java_method(:grantedQoSLevels, []).call().to_a.map { |elt| elt }
  end
  raise ArgumentError, "Invalid arguments when calling granted_qo_s_levels()"
end

- (Fixnum) message_id

Returns Message identifier

Returns:

  • (Fixnum)
    Message identifier

Raises:

  • (ArgumentError)


35
36
37
38
39
40
41
42
43
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_sub_ack_message.rb', line 35

def message_id
  if !block_given?
    if @cached_message_id != nil
      return @cached_message_id
    end
    return @cached_message_id = @j_del.java_method(:messageId, []).call()
  end
  raise ArgumentError, "Invalid arguments when calling message_id()"
end