Class: GorgonAMQ::Protocol::Exchange::Delete

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, exchange, if_unused, nowait) ⇒ Object

u’ticket = 0’, u’exchange = nil’, u’if_unused = false’, u’nowait = false’

Returns:



862
863
864
865
866
867
868
869
870
871
872
873
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 862

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

.has_content?Boolean

Returns:

  • (Boolean)


856
857
858
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 856

def self.has_content?
  false
end