Class: AMQ::Protocol::Basic::GetOk
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#delivery_tag ⇒ Object
readonly
Returns the value of attribute delivery_tag.
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#message_count ⇒ Object
readonly
Returns the value of attribute message_count.
-
#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(delivery_tag, redelivered, exchange, routing_key, message_count) ⇒ GetOk
constructor
A new instance of GetOk.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(delivery_tag, redelivered, exchange, routing_key, message_count) ⇒ GetOk
Returns a new instance of GetOk.
1889 1890 1891 1892 1893 1894 1895 |
# File 'lib/amq/protocol/client.rb', line 1889 def initialize(delivery_tag, redelivered, exchange, routing_key, ) @delivery_tag = delivery_tag @redelivered = redelivered @exchange = exchange @routing_key = routing_key @message_count = end |
Instance Attribute Details
#delivery_tag ⇒ Object (readonly)
Returns the value of attribute delivery_tag.
1888 1889 1890 |
# File 'lib/amq/protocol/client.rb', line 1888 def delivery_tag @delivery_tag end |
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
1888 1889 1890 |
# File 'lib/amq/protocol/client.rb', line 1888 def exchange @exchange end |
#message_count ⇒ Object (readonly)
Returns the value of attribute message_count.
1888 1889 1890 |
# File 'lib/amq/protocol/client.rb', line 1888 def @message_count end |
#redelivered ⇒ Object (readonly)
Returns the value of attribute redelivered.
1888 1889 1890 |
# File 'lib/amq/protocol/client.rb', line 1888 def redelivered @redelivered end |
#routing_key ⇒ Object (readonly)
Returns the value of attribute routing_key.
1888 1889 1890 |
# File 'lib/amq/protocol/client.rb', line 1888 def routing_key @routing_key end |
Class Method Details
.decode(data) ⇒ Object
1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 |
# File 'lib/amq/protocol/client.rb', line 1868 def self.decode(data) offset = 0 delivery_tag = AMQ::Pack.unpack_uint64_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 = data[offset, 4].unpack(PACK_UINT32).first offset += 4 self.new(delivery_tag, redelivered, exchange, routing_key, ) end |
.has_content? ⇒ Boolean
1897 1898 1899 |
# File 'lib/amq/protocol/client.rb', line 1897 def self.has_content? true end |