Class: ActiveMessaging::Adapters::AmazonSqs::Message
- Inherits:
-
BaseMessage
- Object
- BaseMessage
- ActiveMessaging::Adapters::AmazonSqs::Message
- Defined in:
- lib/activemessaging/adapters/asqs.rb
Overview
based on stomp message, has pointer to the SQSResponseObject
Instance Attribute Summary collapse
-
#md5_of_body ⇒ Object
Returns the value of attribute md5_of_body.
-
#queue ⇒ Object
Returns the value of attribute queue.
-
#receipt_handle ⇒ Object
Returns the value of attribute receipt_handle.
-
#response ⇒ Object
Returns the value of attribute response.
Attributes inherited from BaseMessage
#body, #destination, #headers, #id
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(body, headers, id, md5_of_body, receipt_handle, response, queue) ⇒ Message
constructor
A new instance of Message.
- #to_s ⇒ Object
Methods inherited from BaseMessage
Constructor Details
#initialize(body, headers, id, md5_of_body, receipt_handle, response, queue) ⇒ Message
Returns a new instance of Message.
475 476 477 478 |
# File 'lib/activemessaging/adapters/asqs.rb', line 475 def initialize body, headers, id, md5_of_body, receipt_handle, response, queue super(body, id, headers, queue.name) @md5_of_body, @receipt_handle, @response, @queue = md5_of_body, receipt_handle, response, queue end |
Instance Attribute Details
#md5_of_body ⇒ Object
Returns the value of attribute md5_of_body.
469 470 471 |
# File 'lib/activemessaging/adapters/asqs.rb', line 469 def md5_of_body @md5_of_body end |
#queue ⇒ Object
Returns the value of attribute queue.
469 470 471 |
# File 'lib/activemessaging/adapters/asqs.rb', line 469 def queue @queue end |
#receipt_handle ⇒ Object
Returns the value of attribute receipt_handle.
469 470 471 |
# File 'lib/activemessaging/adapters/asqs.rb', line 469 def receipt_handle @receipt_handle end |
#response ⇒ Object
Returns the value of attribute response.
469 470 471 |
# File 'lib/activemessaging/adapters/asqs.rb', line 469 def response @response end |
Class Method Details
.from_element(e, response, queue) ⇒ Object
471 472 473 |
# File 'lib/activemessaging/adapters/asqs.rb', line 471 def self.from_element e, response, queue Message.new(e.elements['Body'].text, response.headers, e.elements['MessageId'].text, e.elements['MD5OfBody'].text, e.elements['ReceiptHandle'].text, response, queue) end |
Instance Method Details
#to_s ⇒ Object
480 481 482 |
# File 'lib/activemessaging/adapters/asqs.rb', line 480 def to_s "<AmazonSQS::Message id='#{id}' body='#{body}' headers='#{headers.inspect}' response='#{response}'>" end |