Class: Paho::Processor::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/paho/processor/base.rb

Constant Summary collapse

TOPIC =
'#'

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base


6
7
8
# File 'lib/paho/processor/base.rb', line 6

def initialize
  puts "Starting #{self.class.name} processor"
end

Instance Method Details

#__get(t, message) ⇒ Object Also known as: messageArrived


14
15
16
17
18
# File 'lib/paho/processor/base.rb', line 14

def __get(t, message)
  log "Listening on #{topic} got [#{t}] #{message.toString}"

  get(t, message.toString)
end

#topicObject


10
11
12
# File 'lib/paho/processor/base.rb', line 10

def topic
  self.class::TOPIC
end