Class: GorgonAMQ::Protocol::Basic::Get

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, queue, no_ack) ⇒ Object

u’ticket = 0’, u’queue = EMPTY_STRING’, u’no_ack = false’

Returns:



1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1846

def self.encode(channel, queue, no_ack)
  ticket = 0
  buffer = @packed_indexes.dup
  buffer << [ticket].pack(PACK_UINT16)
  buffer << queue.to_s.bytesize.chr
  buffer << queue.to_s
  bit_buffer = 0
  bit_buffer = bit_buffer | (1 << 0) if no_ack
  buffer << [bit_buffer].pack(PACK_CHAR)
  MethodFrame.new(buffer, channel)
end

.has_content?Boolean

Returns:

  • (Boolean)


1840
1841
1842
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1840

def self.has_content?
  false
end