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

u’ticket = 0’, u’queue = EMPTY_STRING’, u’exchange = nil’, u’routing_key = EMPTY_STRING’, u’nowait = false’, u’arguments = {}‘

Returns:



1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
# File 'lib/amq/protocol/client.rb', line 1167

def self.encode(channel, queue, exchange, routing_key, nowait, arguments)
  ticket = 0
  buffer = @packed_indexes.dup
  buffer << [ticket].pack(PACK_UINT16)
  buffer << queue.to_s.bytesize.chr
  buffer << queue.to_s
  buffer << exchange.to_s.bytesize.chr
  buffer << exchange.to_s
  buffer << routing_key.to_s.bytesize.chr
  buffer << routing_key.to_s
  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)


1161
1162
1163
# File 'lib/amq/protocol/client.rb', line 1161

def self.has_content?
  false
end