Class: AMQ::Protocol::Queue::Bind
- Defined in:
- lib/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 = {}‘
1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/amq/protocol/client.rb', line 1142 def self.encode(channel, queue, exchange, routing_key, nowait, arguments) ticket = 0 buffer = '' buffer << @packed_indexes 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
1136 1137 1138 |
# File 'lib/amq/protocol/client.rb', line 1136 def self.has_content? false end |