Class List Method List File List

# Class: VertxMqtt::MqttUnsubscribeMessage

Inherits:
  Object
  - Object
  - VertxMqtt::MqttUnsubscribeMessage
  show all
Includes:
  MqttMessage
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb

## Overview

Represents an MQTT UNSUBSCRIBE 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)

- - (Fixnum) message_id
  Message identifier.
- - (Array<String>) topics
  List of topics to unsubscribe.

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    19
    20
    21
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb', line 19

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

### + (`Object`) j_api_type

    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb', line 28

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    31
    32
    33
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb', line 31

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

### + (`Object`) unwrap(obj)

    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_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-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb', line 22

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

## Instance Method Details

### - (`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-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_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

### - (`Array<String>`) topics

Returns List of topics to unsubscribe

Returns:

- (`Array<String>`) —
  List of topics to unsubscribe

Raises:

- (`ArgumentError`)

    45
    46
    47
    48
    49
    50
    51
    52
    53
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt/mqtt_unsubscribe_message.rb', line 45

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