Class: GorgonAMQ::Protocol::Basic::Qos

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

Class Method Summary collapse

Methods inherited from Method

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

Class Method Details

.encode(channel, prefetch_size, prefetch_count, global) ⇒ Object

u’prefetch_size = false’, u’prefetch_count = false’, u’global = false’

Returns:



1543
1544
1545
1546
1547
1548
1549
1550
1551
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1543

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

.has_content?Boolean

Returns:

  • (Boolean)


1537
1538
1539
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1537

def self.has_content?
  false
end