Class: AMQ::Protocol::Exchange::Declare
- Defined in:
- lib/amq/protocol/client.rb
Class Method Summary collapse
-
.encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments) ⇒ Object
[“ticket = 0”, “exchange = nil”, “type = ”direct“”, “passive = false”, “durable = false”, “auto_delete = false”, “internal = false”, “nowait = false”, “arguments = {}”].
- .has_content? ⇒ Boolean
Methods inherited from Method
encode_body, index, inherited, instantiate, method_id, methods, name, split_headers
Class Method Details
.encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments) ⇒ Object
- “ticket = 0”, “exchange = nil”, “type = ”direct“”, “passive = false”, “durable = false”, “auto_delete = false”, “internal = false”, “nowait = false”, “arguments = {}”
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/amq/protocol/client.rb', line 800 def self.encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments) ticket = 0 buffer = "" buffer << @packed_indexes buffer << [ticket].pack(PACK_UINT16) buffer << exchange.bytesize.chr buffer << exchange buffer << type.bytesize.chr buffer << type 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 auto_delete bit_buffer = bit_buffer | (1 << 3) if internal 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
794 795 796 |
# File 'lib/amq/protocol/client.rb', line 794 def self.has_content? false end |