public interface IModel
Summary
Common AMQP model, spanning the union of the
functionality offered by versions 0-8, 0-8qpid, and 0-9
(without WIP) of AMQP.
Remarks
Extends the IDisposable interface, so that the "using"
statement can be used to scope the lifetime of a channel when
appropriate.
Property Summary
ShutdownEventArgs
|
CloseReason
(r)
|
Returns null if the session is still in a state
where it can be used, or the cause of its closure
otherwise.
|
bool
|
IsOpen
(r)
|
Returns true if the session is still in a state
where it can be used. Identical to checking if CloseReason
== null.
|
Event Summary
Method Summary
ushort AccessRequest(string realm)
|
(Spec method) Convenience method, asking for
non-exclusive access to all capabilities within a
realm.
|
ushort AccessRequest(string realm, bool exclusive, bool passive, bool active, bool write, bool read)
|
(Spec method) Retrieve an access ticket
("capability") for a realm.
|
void BasicAck(ulong deliveryTag, bool multiple)
|
(Spec method) Acknowledge one or more delivered message(s).
|
void BasicCancel(string consumerTag)
|
Delete a Basic content-class consumer.
|
string BasicConsume(ushort ticket, string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary filter, IBasicConsumer consumer)
|
Start a Basic content-class consumer.
|
string BasicConsume(ushort ticket, string queue, bool noAck, string consumerTag, IDictionary filter, IBasicConsumer consumer)
|
Start a Basic content-class consumer.
|
string BasicConsume(ushort ticket, string queue, IDictionary filter, IBasicConsumer consumer)
|
Start a Basic content-class consumer.
|
string BasicConsume(ushort ticket, string queue, bool noAck, IDictionary filter, IBasicConsumer consumer)
|
Start a Basic content-class consumer.
|
BasicGetResult BasicGet(ushort ticket, string queue, bool noAck)
|
(Spec method) Retrieve an individual message, if
one is available; returns null if the server answers that
no messages are currently available. See also
IModel.BasicAck.
|
void BasicPublish(ushort ticket, string exchange, string routingKey, IBasicProperties basicProperties, byte[] body)
|
(Spec method) Convenience overload of BasicPublish.
|
void BasicPublish(ushort ticket, PublicationAddress addr, IBasicProperties basicProperties, byte[] body)
|
(Spec method) Convenience overload of BasicPublish.
|
void BasicPublish(ushort ticket, string exchange, string routingKey, bool mandatory, bool immediate, IBasicProperties basicProperties, byte[] body)
|
(Spec method) Publish a message using the Basic
content-class.
|
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global)
|
(Spec method) Configures QoS parameters of the Basic content-class.
|
void BasicRecover(bool requeue)
|
(Spec method)
|
void BasicReject(ulong deliveryTag, bool requeue)
|
(Spec method) Reject a delivered message.
|
void ChannelFlow(bool active)
|
(Spec method) Channel flow control functionality.
|
void Close(ushort replyCode, string replyText)
|
Close this session.
|
IBasicProperties CreateBasicProperties()
|
Construct a completely empty content header for
use with the Basic content class.
|
IFileProperties CreateFileProperties()
|
Construct a completely empty content header for
use with the File content class.
|
IStreamProperties CreateStreamProperties()
|
Construct a completely empty content header for
use with the Stream content class.
|
void DtxSelect()
|
(Spec method) Enable DTX mode for this session.
|
void DtxStart(string dtxIdentifier)
|
(Spec method)
|
void ExchangeDeclare(ushort ticket, string exchange, string type, bool durable)
|
(Spec method) Declare an exchange.
|
void ExchangeDeclare(ushort ticket, string exchange, string type)
|
(Spec method) Declare an exchange.
|
void ExchangeDeclare(ushort ticket, string exchange, string type, bool passive, bool durable, bool autoDelete, bool internal, bool nowait, IDictionary arguments)
|
(Spec method) Declare an exchange.
|
void ExchangeDelete(ushort ticket, string exchange, bool ifUnused, bool nowait)
|
(Spec method) Delete an exchange.
|
void QueueBind(ushort ticket, string queue, string exchange, string routingKey, bool nowait, IDictionary arguments)
|
(Spec method) Bind a queue to an exchange.
|
string QueueDeclare(ushort ticket)
|
(Spec method) Declare a queue.
|
string QueueDeclare(ushort ticket, string queue)
|
(Spec method) Declare a queue.
|
string QueueDeclare(ushort ticket, string queue, bool passive, bool durable, bool exclusive, bool autoDelete, bool nowait, IDictionary arguments)
|
(Spec method) Declare a queue.
|
string QueueDeclare(ushort ticket, string queue, bool durable)
|
(Spec method) Declare a queue.
|
uint QueueDelete(ushort ticket, string queue, bool ifUnused, bool ifEmpty, bool nowait)
|
(Spec method) Delete a queue.
|
uint QueuePurge(ushort ticket, string queue, bool nowait)
|
(Spec method) Purge a queue of messages.
|
void QueueUnbind(ushort ticket, string queue, string exchange, string routingKey, IDictionary arguments)
|
(Spec method) Unbind a queue from an exchange.
|
void TxCommit()
|
(Spec method) Commit this session's active TX
transaction.
|
void TxRollback()
|
(Spec method) Roll back this session's active TX
transaction.
|
void TxSelect()
|
(Spec method) Enable TX mode for this session.
|
Property Detail
ShutdownEventArgs CloseReason (r)
Summary
Returns null if the session is still in a state
where it can be used, or the cause of its closure
otherwise.
bool IsOpen (r)
Summary
Returns true if the session is still in a state
where it can be used. Identical to checking if CloseReason
== null.
Event Detail
BasicReturnEventHandler BasicReturn
Summary
Signalled when a Basic.Return command arrives from
the broker.
CallbackExceptionEventHandler CallbackException
Summary
Signalled when an exception occurs in a callback
invoked by the model.
Remarks
Examples of cases where this event will be signalled
include exceptions thrown in IBasicConsumer methods, or
exceptions thrown in ModelShutdownEventHandler delegates
etc.
ModelShutdownEventHandler ModelShutdown
Summary
Notifies the destruction of the model.
Remarks
If the model is already destroyed at the time an event
handler is added to this event, the event handler will be
fired immediately.
Method Detail
AccessRequest
ushort AccessRequest(string realm)
Summary
(Spec method) Convenience method, asking for
non-exclusive access to all capabilities within a
realm.
Remarks
If Access.Request is disabled, either through the IProtocol
default or through the AccessRequestConfig property of
ConnectionParameters, no request is sent to the peer and a
dummy ticket number is returned.
AccessRequest
ushort AccessRequest(string realm, bool exclusive, bool passive, bool active, bool write, bool read)
Summary
(Spec method) Retrieve an access ticket
("capability") for a realm.
Remarks
If Access.Request is disabled, either through the IProtocol
default or through the AccessRequestConfig property of
ConnectionParameters, no request is sent to the peer and a
dummy ticket number is returned.
BasicAck
void BasicAck(ulong deliveryTag, bool multiple)
Summary
(Spec method) Acknowledge one or more delivered message(s).
BasicCancel
void BasicCancel(string consumerTag)
Summary
Delete a Basic content-class consumer.
BasicConsume
string BasicConsume(ushort ticket, string queue, bool noAck, string consumerTag, bool noLocal, bool exclusive, IDictionary filter, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
BasicConsume
string BasicConsume(ushort ticket, string queue, bool noAck, string consumerTag, IDictionary filter, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with
noLocal=false and exclusive=false.
BasicConsume
string BasicConsume(ushort ticket, string queue, IDictionary filter, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with noAck=false (i.e. BasicAck is required),
an empty consumer tag (i.e. the server creates and returns a fresh consumer tag),
noLocal=false and exclusive=false.
BasicConsume
string BasicConsume(ushort ticket, string queue, bool noAck, IDictionary filter, IBasicConsumer consumer)
Summary
Start a Basic content-class consumer.
Remarks
The consumer is started with
an empty consumer tag (i.e. the server creates and returns a fresh consumer tag),
noLocal=false and exclusive=false.
BasicGet
BasicGetResult BasicGet(ushort ticket, string queue, bool noAck)
Summary
(Spec method) Retrieve an individual message, if
one is available; returns null if the server answers that
no messages are currently available. See also
IModel.BasicAck.
BasicPublish
void BasicPublish(ushort ticket, string exchange, string routingKey, IBasicProperties basicProperties, byte[] body)
Summary
(Spec method) Convenience overload of BasicPublish.
Remarks
The publication occurs with mandatory=false and immediate=false.
BasicPublish
void BasicPublish(ushort ticket, PublicationAddress addr, IBasicProperties basicProperties, byte[] body)
Summary
(Spec method) Convenience overload of BasicPublish.
Remarks
The publication occurs with mandatory=false and immediate=false.
BasicPublish
void BasicPublish(ushort ticket, string exchange, string routingKey, bool mandatory, bool immediate, IBasicProperties basicProperties, byte[] body)
Summary
(Spec method) Publish a message using the Basic
content-class.
BasicQos
void BasicQos(uint prefetchSize, ushort prefetchCount, bool global)
Summary
(Spec method) Configures QoS parameters of the Basic content-class.
BasicRecover
void BasicRecover(bool requeue)
BasicReject
void BasicReject(ulong deliveryTag, bool requeue)
Summary
(Spec method) Reject a delivered message.
ChannelFlow
void ChannelFlow(bool active)
Summary
(Spec method) Channel flow control functionality.
Close
void Close(ushort replyCode, string replyText)
Summary
Close this session.
Remarks
If the session is already closed (or closing), then this
method does nothing but wait for the in-progress close
operation to complete. This method will not return to the
caller until the shutdown is complete.
CreateBasicProperties
IBasicProperties CreateBasicProperties()
Summary
Construct a completely empty content header for
use with the Basic content class.
CreateFileProperties
IFileProperties CreateFileProperties()
Summary
Construct a completely empty content header for
use with the File content class.
CreateStreamProperties
IStreamProperties CreateStreamProperties()
Summary
Construct a completely empty content header for
use with the Stream content class.
DtxSelect
void DtxSelect()
Summary
(Spec method) Enable DTX mode for this session.
DtxStart
void DtxStart(string dtxIdentifier)
ExchangeDeclare
void ExchangeDeclare(ushort ticket, string exchange, string type, bool durable)
Summary
(Spec method) Declare an exchange.
Remarks
The exchange is declared non-passive, non-autodelete, and
non-internal, with no arguments. The "nowait" option is not
exercised.
ExchangeDeclare
void ExchangeDeclare(ushort ticket, string exchange, string type)
Summary
(Spec method) Declare an exchange.
Remarks
The exchange is declared non-passive, non-durable, non-autodelete, and
non-internal, with no arguments. The "nowait" option is not
exercised.
ExchangeDeclare
void ExchangeDeclare(ushort ticket, string exchange, string type, bool passive, bool durable, bool autoDelete, bool internal, bool nowait, IDictionary arguments)
Summary
(Spec method) Declare an exchange.
ExchangeDelete
void ExchangeDelete(ushort ticket, string exchange, bool ifUnused, bool nowait)
Summary
(Spec method) Delete an exchange.
QueueBind
void QueueBind(ushort ticket, string queue, string exchange, string routingKey, bool nowait, IDictionary arguments)
Summary
(Spec method) Bind a queue to an exchange.
QueueDeclare
string QueueDeclare(ushort ticket)
Summary
(Spec method) Declare a queue.
Remarks
The queue is declared non-passive, non-durable,
but exclusive and autodelete, with no arguments. The
server autogenerates a name for the queue - the generated
name is the return value of this method.
QueueDeclare
string QueueDeclare(ushort ticket, string queue)
Summary
(Spec method) Declare a queue.
Remarks
The queue is declared non-passive, non-durable,
non-exclusive, and non-autodelete, with no arguments.
QueueDeclare
string QueueDeclare(ushort ticket, string queue, bool passive, bool durable, bool exclusive, bool autoDelete, bool nowait, IDictionary arguments)
Summary
(Spec method) Declare a queue.
Remarks
Returns the name of the queue that was declared.
QueueDeclare
string QueueDeclare(ushort ticket, string queue, bool durable)
Summary
(Spec method) Declare a queue.
Remarks
The queue is declared non-passive, non-exclusive, and
non-autodelete, with no arguments.
QueueDelete
uint QueueDelete(ushort ticket, string queue, bool ifUnused, bool ifEmpty, bool nowait)
Summary
(Spec method) Delete a queue.
Remarks
Returns the number of messages purged during queue
deletion. If nowait is specified, returns
uint.MaxValue
.
QueuePurge
uint QueuePurge(ushort ticket, string queue, bool nowait)
Summary
(Spec method) Purge a queue of messages.
Remarks
Returns the number of messages purged. If nowait is
specified, returns
uint.MaxValue
.
QueueUnbind
void QueueUnbind(ushort ticket, string queue, string exchange, string routingKey, IDictionary arguments)