Class: GorgonAMQ::Protocol::Queue::Bind
- Defined in:
- lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb
Class Method Summary collapse
-
.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 = {}‘].
- .has_content? ⇒ Boolean
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 = {}‘
1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 |
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1094 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 << GorgonAMQ::Protocol::Table.encode(arguments) MethodFrame.new(buffer, channel) end |
.has_content? ⇒ Boolean
1088 1089 1090 |
# File 'lib/gorgon_amq-protocol/lib/gorgon_amq/protocol/client.rb', line 1088 def self.has_content? false end |