Class: AMQ::Protocol::Channel::Flow

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

- (Flow) initialize(active)



653
654
655
# File 'lib/amq/protocol/client.rb', line 653

def initialize(active)
  @active = active
end

Instance Attribute Details

- (Object) active (readonly)

Returns the value of attribute active



652
653
654
# File 'lib/amq/protocol/client.rb', line 652

def active
  @active
end

Class Method Details

+ (Object) decode(data)



644
645
646
647
648
649
650
# File 'lib/amq/protocol/client.rb', line 644

def self.decode(data)
  offset = 0
  bit_buffer = data[offset, 1].unpack(PACK_CHAR).first
  offset += 1
  active = (bit_buffer & (1 << 0)) != 0
  self.new(active)
end

+ (Object) encode(channel, active)

u'active = nil'


663
664
665
666
667
668
669
# File 'lib/amq/protocol/client.rb', line 663

def self.encode(channel, active)
  buffer = @packed_indexes.dup
  bit_buffer = 0
  bit_buffer = bit_buffer | (1 << 0) if active
  buffer << [bit_buffer].pack(PACK_CHAR)
  MethodFrame.new(buffer, channel)
end

+ (Boolean) has_content?



657
658
659
# File 'lib/amq/protocol/client.rb', line 657

def self.has_content?
  false
end