Class: VertxMqtt::MqttTopicSubscription

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

Overview

Represents a subscription to a topic

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


17
18
19
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_topic_subscription.rb', line 17

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

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

def self.j_class
  Java::IoVertxMqtt::MqttTopicSubscription.java_class
end

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (:AT_MOST_ONCE, ...) quality_of_service

Returns Quality of Service level for the subscription

Returns:

  • (:AT_MOST_ONCE, :AT_LEAST_ONCE, :EXACTLY_ONCE, :FAILURE)
    Quality of Service level for the subscription

Raises:

  • (ArgumentError)


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

def quality_of_service
  if !block_given?
    if @cached_quality_of_service != nil
      return @cached_quality_of_service
    end
    return @cached_quality_of_service = @j_del.java_method(:qualityOfService, []).call().name.intern
  end
  raise ArgumentError, "Invalid arguments when calling quality_of_service()"
end

- (String) topic_name

Returns Subscription topic name

Returns:

  • (String)
    Subscription topic name

Raises:

  • (ArgumentError)


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

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