Class: AMQ::Protocol::Queue::DeclareOk

Inherits:
Method
  • Object
show all
Defined in:
lib/amq/protocol/client.rb

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Method

encode_body, index, inherited, instantiate, method_id, methods, name, split_headers

Constructor Details

- (DeclareOk) initialize(queue, message_count, consumer_count)



1068
1069
1070
1071
1072
# File 'lib/amq/protocol/client.rb', line 1068

def initialize(queue, message_count, consumer_count)
  @queue = queue
  @message_count = message_count
  @consumer_count = consumer_count
end

Instance Attribute Details

- (Object) consumer_count (readonly)

Returns the value of attribute consumer_count



1067
1068
1069
# File 'lib/amq/protocol/client.rb', line 1067

def consumer_count
  @consumer_count
end

- (Object) message_count (readonly)

Returns the value of attribute message_count



1067
1068
1069
# File 'lib/amq/protocol/client.rb', line 1067

def message_count
  @message_count
end

- (Object) queue (readonly)

Returns the value of attribute queue



1067
1068
1069
# File 'lib/amq/protocol/client.rb', line 1067

def queue
  @queue
end

Class Method Details

+ (Object) decode(data)



1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
# File 'lib/amq/protocol/client.rb', line 1054

def self.decode(data)
  offset = 0
  length = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  queue = data[offset, length]
  offset += length
  message_count = data[offset, 4].unpack(PACK_UINT32).first
  offset += 4
  consumer_count = data[offset, 4].unpack(PACK_UINT32).first
  offset += 4
  self.new(queue, message_count, consumer_count)
end

+ (Boolean) has_content?



1074
1075
1076
# File 'lib/amq/protocol/client.rb', line 1074

def self.has_content?
  false
end