Class: AMQ::Protocol::Exchange::Declare

### Home Classes Methods

### In Files

- lib/amq/protocol/client.rb

### Parent

AMQ::Protocol::Method

### Methods

- ::encode
- ::has_content?

### Class/Module Index

Quicksearch

- AMQ
- AMQ::BitSet
- AMQ::Endianness
- AMQ::Hacks
- AMQ::IntAllocator
- AMQ::Pack
- AMQ::Protocol
- AMQ::Protocol::AccessRefused
- AMQ::Protocol::BadResponseError
- AMQ::Protocol::Basic
- AMQ::Protocol::Basic::Ack
- AMQ::Protocol::Basic::Cancel
- AMQ::Protocol::Basic::CancelOk
- AMQ::Protocol::Basic::Consume
- AMQ::Protocol::Basic::ConsumeOk
- AMQ::Protocol::Basic::Deliver
- AMQ::Protocol::Basic::Get
- AMQ::Protocol::Basic::GetEmpty
- AMQ::Protocol::Basic::GetOk
- AMQ::Protocol::Basic::Nack
- AMQ::Protocol::Basic::Publish
- AMQ::Protocol::Basic::Qos
- AMQ::Protocol::Basic::QosOk
- AMQ::Protocol::Basic::Recover
- AMQ::Protocol::Basic::RecoverAsync
- AMQ::Protocol::Basic::RecoverOk
- AMQ::Protocol::Basic::Reject
- AMQ::Protocol::Basic::Return
- AMQ::Protocol::BodyFrame
- AMQ::Protocol::Channel
- AMQ::Protocol::Channel::Close
- AMQ::Protocol::Channel::CloseOk
- AMQ::Protocol::Channel::Flow
- AMQ::Protocol::Channel::FlowOk
- AMQ::Protocol::Channel::Open
- AMQ::Protocol::Channel::OpenOk
- AMQ::Protocol::ChannelError
- AMQ::Protocol::Class
- AMQ::Protocol::CommandInvalid
- AMQ::Protocol::Confirm
- AMQ::Protocol::Confirm::Select
- AMQ::Protocol::Confirm::SelectOk
- AMQ::Protocol::Connection
- AMQ::Protocol::Connection::Blocked
- AMQ::Protocol::Connection::Close
- AMQ::Protocol::Connection::CloseOk
- AMQ::Protocol::Connection::Open
- AMQ::Protocol::Connection::OpenOk
- AMQ::Protocol::Connection::Secure
- AMQ::Protocol::Connection::SecureOk
- AMQ::Protocol::Connection::Start
- AMQ::Protocol::Connection::StartOk
- AMQ::Protocol::Connection::Tune
- AMQ::Protocol::Connection::TuneOk
- AMQ::Protocol::Connection::Unblocked
- AMQ::Protocol::ConnectionForced
- AMQ::Protocol::ContentTooLarge
- AMQ::Protocol::EmptyResponseError
- AMQ::Protocol::Error
- AMQ::Protocol::Exchange
- AMQ::Protocol::Exchange::Bind
- AMQ::Protocol::Exchange::BindOk
- AMQ::Protocol::Exchange::Declare
- AMQ::Protocol::Exchange::DeclareOk
- AMQ::Protocol::Exchange::Delete
- AMQ::Protocol::Exchange::DeleteOk
- AMQ::Protocol::Exchange::Unbind
- AMQ::Protocol::Exchange::UnbindOk
- AMQ::Protocol::Float32Bit
- AMQ::Protocol::Frame
- AMQ::Protocol::FrameError
- AMQ::Protocol::FrameSubclass
- AMQ::Protocol::FrameTypeError
- AMQ::Protocol::HardError
- AMQ::Protocol::HeaderFrame
- AMQ::Protocol::HeartbeatFrame
- AMQ::Protocol::InternalError
- AMQ::Protocol::InvalidPath
- AMQ::Protocol::Method
- AMQ::Protocol::MethodFrame
- AMQ::Protocol::NoConsumers
- AMQ::Protocol::NoRoute
- AMQ::Protocol::NotAllowed
- AMQ::Protocol::NotFound
- AMQ::Protocol::NotImplemented
- AMQ::Protocol::PreconditionFailed
- AMQ::Protocol::Queue
- AMQ::Protocol::Queue::Bind
- AMQ::Protocol::Queue::BindOk
- AMQ::Protocol::Queue::Declare
- AMQ::Protocol::Queue::DeclareOk
- AMQ::Protocol::Queue::Delete
- AMQ::Protocol::Queue::DeleteOk
- AMQ::Protocol::Queue::Purge
- AMQ::Protocol::Queue::PurgeOk
- AMQ::Protocol::Queue::Unbind
- AMQ::Protocol::Queue::UnbindOk
- AMQ::Protocol::ResourceError
- AMQ::Protocol::ResourceLocked
- AMQ::Protocol::SoftError
- AMQ::Protocol::SyntaxError
- AMQ::Protocol::Table
- AMQ::Protocol::Table::InvalidTableError
- AMQ::Protocol::TableValueDecoder
- AMQ::Protocol::TableValueEncoder
- AMQ::Protocol::Tx
- AMQ::Protocol::Tx::Commit
- AMQ::Protocol::Tx::CommitOk
- AMQ::Protocol::Tx::Rollback
- AMQ::Protocol::Tx::RollbackOk
- AMQ::Protocol::Tx::Select
- AMQ::Protocol::Tx::SelectOk
- AMQ::Protocol::TypeConstants
- AMQ::Protocol::UnexpectedFrame

No matching classes.

# AMQ::Protocol::Exchange::Declare

### Public Class Methods

encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments) click to toggle source

@return

u'ticket = 0', u'exchange = nil', u"type = u'direct'", u'passive = false', u'durable = false', u'auto_delete = false', u'internal = false', u'nowait = false', u'arguments = {}'

    # File lib/amq/protocol/client.rb, line 805
    def self.encode(channel, exchange, type, passive, durable, auto_delete, internal, nowait, arguments)
      ticket = 0
      buffer = @packed_indexes.dup
      buffer << [ticket].pack(PACK_UINT16)
      buffer << exchange.to_s.bytesize.chr
      buffer << exchange.to_s
      buffer << type.to_s.bytesize.chr
      buffer << type.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 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?() click to toggle source

    # File lib/amq/protocol/client.rb, line 799
    def self.has_content?
      false
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.