Class: Euston::Daemons::Pipeline::CommandProcessor::Component
- Inherits:
-
Euston::DaemonComponent
- Object
- Euston::DaemonComponent
- Euston::Daemons::Pipeline::CommandProcessor::Component
- Includes:
- CommandHandlerPrivateMethodNames
- Defined in:
- lib/euston-daemons/pipeline/lib/command_processor/component.rb
Instance Method Summary collapse
-
#initialize(channel, handlers, id = 1, logger = Euston::NullLogger.instance) ⇒ Component
constructor
A new instance of Component.
Methods inherited from Euston::DaemonComponent
Methods included from Exceptions
Constructor Details
#initialize(channel, handlers, id = 1, logger = Euston::NullLogger.instance) ⇒ Component
Returns a new instance of Component.
8 9 10 11 12 13 14 15 16 |
# File 'lib/euston-daemons/pipeline/lib/command_processor/component.rb', line 8 def initialize channel, handlers, id = 1, logger = Euston::NullLogger.instance @channel = channel @channel.prefetch = 1 @handlers = handlers @id = id @log = logger @process_method = method(:process_message) @stopwatch = Stopwatch.new.when(:finished => method(:log_elapsed_time)) end |