Class: ActiveMessaging::Adapters::Synch::Message

Inherits:
BaseMessage
  • Object
show all
Defined in:
lib/activemessaging/adapters/synch.rb

Instance Attribute Summary collapse

Attributes inherited from BaseMessage

#body, #destination, #headers, #id

Instance Method Summary collapse

Methods inherited from BaseMessage

#dup, #matches_subscription?, #to_s

Constructor Details

#initialize(body, id, headers, destination, command = 'MESSAGE') ⇒ Message

Returns a new instance of Message.



85
86
87
88
89
# File 'lib/activemessaging/adapters/synch.rb', line 85

def initialize body, id, headers, destination, command='MESSAGE'
  # ActiveMessaging.logger.debug "Message headers:#{headers.inspect}, id:#{id}, body:#{body}, destination:#{destination}, command:#{command}"
  @headers, @body, @destination, @command =  headers, body, destination, command
  headers['destination'] = destination
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



83
84
85
# File 'lib/activemessaging/adapters/synch.rb', line 83

def command
  @command
end