Class: VertxMqttServer::MqttPublishMessage

Inherits:
Object
  • Object
show all
Includes:
MqttMessage
Defined in:
/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb

Overview

Represents an MQTT PUBLISH message

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


20
21
22
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 20

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

+ (Object) j_api_type



29
30
31
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 29

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



32
33
34
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 32

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

+ (Object) unwrap(obj)



26
27
28
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 26

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

+ (Object) wrap(obj)



23
24
25
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 23

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

Instance Method Details

- (true, false) dup?

Returns If the message is a duplicate

Returns:

  • (true, false)
    If the message is a duplicate

Raises:

  • (ArgumentError)


56
57
58
59
60
61
62
63
64
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 56

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

- (Fixnum) message_id

Returns Message identifier

Returns:

  • (Fixnum)
    Message identifier

Raises:

  • (ArgumentError)


36
37
38
39
40
41
42
43
44
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 36

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

- (::Vertx::Buffer) payload

Returns Payload message

Returns:

Raises:

  • (ArgumentError)


86
87
88
89
90
91
92
93
94
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 86

def payload
  if !block_given?
    if @cached_payload != nil
      return @cached_payload
    end
    return @cached_payload = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:payload, []).call(),::Vertx::Buffer)
  end
  raise ArgumentError, "Invalid arguments when calling payload()"
end

- (:AT_MOST_ONCE, ...) qos_level

Returns Quality of service level

Returns:

  • (:AT_MOST_ONCE, :AT_LEAST_ONCE, :EXACTLY_ONCE, :FAILURE)
    Quality of service level

Raises:

  • (ArgumentError)


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

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

- (true, false) retain?

Returns If the message needs to be retained

Returns:

  • (true, false)
    If the message needs to be retained

Raises:

  • (ArgumentError)


66
67
68
69
70
71
72
73
74
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 66

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

- (String) topic_name

Returns Topic on which the message was published

Returns:

  • (String)
    Topic on which the message was published

Raises:

  • (ArgumentError)


76
77
78
79
80
81
82
83
84
# File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-mqtt-server/mqtt_publish_message.rb', line 76

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