Class: AMQ::Protocol::Channel::Flow
- Defined in:
- lib/amq/protocol/client.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
Class Method Summary collapse
- .decode(data) ⇒ Object
-
.encode(channel, active) ⇒ Object
[“active = nil”].
- .has_content? ⇒ Boolean
Instance Method Summary collapse
-
#initialize(active) ⇒ Flow
constructor
A new instance of Flow.
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Constructor Details
#initialize(active) ⇒ Flow
Returns a new instance of Flow.
651 652 653 |
# File 'lib/amq/protocol/client.rb', line 651 def initialize(active) @active = active end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
650 651 652 |
# File 'lib/amq/protocol/client.rb', line 650 def active @active end |
Class Method Details
.decode(data) ⇒ Object
642 643 644 645 646 647 648 |
# File 'lib/amq/protocol/client.rb', line 642 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 |
.encode(channel, active) ⇒ Object
- “active = nil”
661 662 663 664 665 666 667 668 |
# File 'lib/amq/protocol/client.rb', line 661 def self.encode(channel, active) buffer = "" buffer << @packed_indexes bit_buffer = 0 bit_buffer = bit_buffer | (1 << 0) if active buffer << [bit_buffer].pack(PACK_CHAR) MethodFrame.new(buffer, channel) end |
.has_content? ⇒ Boolean
655 656 657 |
# File 'lib/amq/protocol/client.rb', line 655 def self.has_content? false end |