Class: Paho::Message

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/paho/message.rb

Constant Summary collapse

QOS =
1

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ Message

Returns a new instance of Message.


15
16
17
18
# File 'lib/paho/message.rb', line 15

def initialize(msg = nil)
  payload = msg.to_s.to_java_bytes unless msg.nil?
  @message = Paho::Eclipse::MqttMessage.new(payload)
end

Instance Method Details

#mutable=(val) ⇒ Object


28
29
30
# File 'lib/paho/message.rb', line 28

def mutable=(val)
  @message.setMutable(val)
end

#payload=(val) ⇒ Object


20
21
22
# File 'lib/paho/message.rb', line 20

def payload=(val)
  @message.setPayload(val)
end

#qos=(val) ⇒ Object


24
25
26
# File 'lib/paho/message.rb', line 24

def qos=(val)
  @message.setQos(val)
end

#retained=(val) ⇒ Object


32
33
34
# File 'lib/paho/message.rb', line 32

def retained=(val)
  @message.setRetained(val)
end