Class: AMQ::Protocol::Basic::Deliver
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#consumer_tag ⇒ Object
readonly
Returns the value of attribute consumer_tag.
-
#delivery_tag ⇒ Object
readonly
Returns the value of attribute delivery_tag.
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#redelivered ⇒ Object
readonly
Returns the value of attribute redelivered.
-
#routing_key ⇒ Object
readonly
Returns the value of attribute routing_key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(consumer_tag, delivery_tag, redelivered, exchange, routing_key) ⇒ Deliver
constructor
A new instance of Deliver.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(consumer_tag, delivery_tag, redelivered, exchange, routing_key) ⇒ Deliver
Returns a new instance of Deliver.
1768 1769 1770 1771 1772 1773 1774 |
# File 'lib/amq/protocol/client.rb', line 1768 def initialize(consumer_tag, delivery_tag, redelivered, exchange, routing_key) @consumer_tag = consumer_tag @delivery_tag = delivery_tag @redelivered = redelivered @exchange = exchange @routing_key = routing_key end |
Instance Attribute Details
#consumer_tag ⇒ Object (readonly)
Returns the value of attribute consumer_tag.
1767 1768 1769 |
# File 'lib/amq/protocol/client.rb', line 1767 def consumer_tag @consumer_tag end |
#delivery_tag ⇒ Object (readonly)
Returns the value of attribute delivery_tag.
1767 1768 1769 |
# File 'lib/amq/protocol/client.rb', line 1767 def delivery_tag @delivery_tag end |
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
1767 1768 1769 |
# File 'lib/amq/protocol/client.rb', line 1767 def exchange @exchange end |
#redelivered ⇒ Object (readonly)
Returns the value of attribute redelivered.
1767 1768 1769 |
# File 'lib/amq/protocol/client.rb', line 1767 def redelivered @redelivered end |
#routing_key ⇒ Object (readonly)
Returns the value of attribute routing_key.
1767 1768 1769 |
# File 'lib/amq/protocol/client.rb', line 1767 def routing_key @routing_key end |
Class Method Details
.decode(data) ⇒ Object
1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 |
# File 'lib/amq/protocol/client.rb', line 1745 def self.decode(data) offset = 0 length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 consumer_tag = data[offset, length] offset += length delivery_tag = AMQ::Hacks.unpack_64_big_endian(data[offset, 8]).first offset += 8 bit_buffer = data[offset, 1].unpack(PACK_CHAR).first offset += 1 redelivered = (bit_buffer & (1 << 0)) != 0 length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 exchange = data[offset, length] offset += length length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 routing_key = data[offset, length] offset += length self.new(consumer_tag, delivery_tag, redelivered, exchange, routing_key) end |
.has_content? ⇒ Boolean
1776 1777 1778 |
# File 'lib/amq/protocol/client.rb', line 1776 def self.has_content? true end |