Class: AMQ::Protocol::Queue::DeclareOk
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#consumer_count ⇒ Object
readonly
Returns the value of attribute consumer_count.
-
#message_count ⇒ Object
readonly
Returns the value of attribute message_count.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(queue, message_count, consumer_count) ⇒ DeclareOk
constructor
A new instance of DeclareOk.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(queue, message_count, consumer_count) ⇒ DeclareOk
Returns a new instance of DeclareOk.
1141 1142 1143 1144 1145 |
# File 'lib/amq/protocol/client.rb', line 1141 def initialize(queue, , consumer_count) @queue = queue @message_count = @consumer_count = consumer_count end |
Instance Attribute Details
#consumer_count ⇒ Object (readonly)
Returns the value of attribute consumer_count.
1140 1141 1142 |
# File 'lib/amq/protocol/client.rb', line 1140 def consumer_count @consumer_count end |
#message_count ⇒ Object (readonly)
Returns the value of attribute message_count.
1140 1141 1142 |
# File 'lib/amq/protocol/client.rb', line 1140 def @message_count end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
1140 1141 1142 |
# File 'lib/amq/protocol/client.rb', line 1140 def queue @queue end |
Class Method Details
.decode(data) ⇒ Object
1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 |
# File 'lib/amq/protocol/client.rb', line 1127 def self.decode(data) offset = offset = 0 # self-assigning offset to eliminate "assigned but unused variable" warning even if offset is not used in this method length = data[offset, 1].unpack(PACK_CHAR).first offset += 1 queue = data[offset, length] offset += length = data[offset, 4].unpack(PACK_UINT32).first offset += 4 consumer_count = data[offset, 4].unpack(PACK_UINT32).first offset += 4 self.new(queue, , consumer_count) end |
.has_content? ⇒ Boolean
1147 1148 1149 |
# File 'lib/amq/protocol/client.rb', line 1147 def self.has_content? false end |