Sha256: 356f1b768c516399ef6099aecb2b156d05faef6c8d82d3caf66ca5734074c7c1

Contents?: true

Size: 505 Bytes

Versions: 1

Compression:

Stored size: 505 Bytes

Contents

module Paho
  module Processor
    class Base
      TOPIC = '#'

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

      def topic
        self.class::TOPIC
      end

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

        get(t, message.toString)
      end

      alias_method :messageArrived, :__get

      private

      def log(m)
        puts "[Paho][Processor][#{self.class.name}]: #{m}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paho-0.0.1-java lib/paho/processor/base.rb