Class: Torquebox::Messaging::EchoProcessor

Inherits:
TorqueBox::Messaging::MessageProcessor show all
Defined in:
messaging/lib/torquebox/messaging/echo_processor.rb

Instance Attribute Summary

Attributes inherited from TorqueBox::Messaging::MessageProcessor

#:message

Instance Method Summary (collapse)

Methods inherited from TorqueBox::Messaging::MessageProcessor

#initialize_proxy, list, lookup, messaging_service_name, #method_missing, #on_error, #process!, #reply

Methods included from TorqueBox::Messaging::ProcessorMiddleware::DefaultMiddleware

default, #middleware

Constructor Details

- (EchoProcessor) initialize(options = {})

Returns a new instance of EchoProcessor



25
26
27
# File 'messaging/lib/torquebox/messaging/echo_processor.rb', line 25

def initialize(options={})
  @response_queue = TorqueBox::Messaging::Queue.new(options['response_queue'])
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TorqueBox::Messaging::MessageProcessor

Instance Method Details

- (Object) on_message(body)



29
30
31
# File 'messaging/lib/torquebox/messaging/echo_processor.rb', line 29

def on_message(body)
  @response_queue.publish(body)
end