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)


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

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

+ (Object) j_api_type



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

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



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

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

+ (Object) unwrap(obj)



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

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

+ (Object) wrap(obj)



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

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

Instance Method Details

- (:AT_MOST_ONCE, ...) qualityOfService

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


50
51
52
53
54
55
56
57
58
59
60
61
62
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-mqtt/mqtt_topic_subscription.rb', line 50

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling quality_of_service()"
  end
end

- (String) topicName

Returns Subscription topic name

Returns:

  • (String)
    Subscription topic name


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

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
  if defined?(super)
    super
  else
    raise ArgumentError, "Invalid arguments when calling topic_name()"
  end
end