Class: AMQ::Protocol::Queue::Bind

Inherits:
Method
  • Object
show all
Defined in:
lib/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, exchange, routing_key, nowait, arguments) ⇒ Object

“ticket = 0”, “queue = EMPTY_STRING”, “exchange = nil”, “routing_key = EMPTY_STRING”, “nowait = false”, “arguments = {}”

Returns:



1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
# File 'lib/amq/protocol/client.rb', line 1070

def self.encode(channel, queue, exchange, routing_key, nowait, arguments)
  ticket = 0
  buffer = ""
  buffer << @packed_indexes
  buffer << [ticket].pack(PACK_UINT16)
  buffer << queue.bytesize.chr
  buffer << queue
  buffer << exchange.bytesize.chr
  buffer << exchange
  buffer << routing_key.bytesize.chr
  buffer << routing_key
  bit_buffer = 0
  bit_buffer = bit_buffer | (1 << 0) if nowait
  buffer << [bit_buffer].pack(PACK_CHAR)
  buffer << AMQ::Protocol::Table.encode(arguments)
  MethodFrame.new(buffer, channel)
end

.has_content?Boolean

Returns:

  • (Boolean)


1064
1065
1066
# File 'lib/amq/protocol/client.rb', line 1064

def self.has_content?
  false
end