Class: AMQ::Protocol::Queue::Declare
- Defined in:
- lib/amq/protocol/client.rb
Class Method Summary collapse
-
.encode(channel, queue, passive, durable, exclusive, auto_delete, nowait, arguments) ⇒ Object
[u’ticket = 0’, u’queue = EMPTY_STRING’, u’passive = false’, u’durable = false’, u’exclusive = false’, u’auto_delete = false’, 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, passive, durable, exclusive, auto_delete, nowait, arguments) ⇒ Object
- u’ticket = 0’, u’queue = EMPTY_STRING’, u’passive = false’, u’durable = false’, u’exclusive = false’, u’auto_delete = false’, u’nowait = false’, u’arguments = {}‘
1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 |
# File 'lib/amq/protocol/client.rb', line 1101 def self.encode(channel, queue, passive, durable, exclusive, auto_delete, nowait, arguments) ticket = 0 buffer = @packed_indexes.dup buffer << [ticket].pack(PACK_UINT16) buffer << queue.to_s.bytesize.chr buffer << queue.to_s bit_buffer = 0 bit_buffer = bit_buffer | (1 << 0) if passive bit_buffer = bit_buffer | (1 << 1) if durable bit_buffer = bit_buffer | (1 << 2) if exclusive bit_buffer = bit_buffer | (1 << 3) if auto_delete bit_buffer = bit_buffer | (1 << 4) if nowait buffer << [bit_buffer].pack(PACK_CHAR) buffer << AMQ::Protocol::Table.encode(arguments) MethodFrame.new(buffer, channel) end |
.has_content? ⇒ Boolean
1095 1096 1097 |
# File 'lib/amq/protocol/client.rb', line 1095 def self.has_content? false end |