// The APL v2.0:
//
//---------------------------------------------------------------------------
-// Copyright (C) 2007, 2008 LShift Ltd., Cohesive Financial
+// Copyright (C) 2007-2009 LShift Ltd., Cohesive Financial
// Technologies LLC., and Rabbit Technologies Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
//
// The Original Code is The RabbitMQ .NET Client.
//
-// The Initial Developers of the Original Code are LShift Ltd.,
-// Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd.
+// The Initial Developers of the Original Code are LShift Ltd,
+// Cohesive Financial Technologies LLC, and Rabbit Technologies Ltd.
//
-// Portions created by LShift Ltd., Cohesive Financial Technologies
-// LLC., and Rabbit Technologies Ltd. are Copyright (C) 2007, 2008
-// LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit
-// Technologies Ltd.;
+// Portions created before 22-Nov-2008 00:00:00 GMT by LShift Ltd,
+// Cohesive Financial Technologies LLC, or Rabbit Technologies Ltd
+// are Copyright (C) 2007-2008 LShift Ltd, Cohesive Financial
+// Technologies LLC, and Rabbit Technologies Ltd.
+//
+// Portions created by LShift Ltd are Copyright (C) 2007-2009 LShift
+// Ltd. Portions created by Cohesive Financial Technologies LLC are
+// Copyright (C) 2007-2009 Cohesive Financial Technologies
+// LLC. Portions created by Rabbit Technologies Ltd are Copyright
+// (C) 2007-2009 Rabbit Technologies Ltd.
//
// All Rights Reserved.
//
[return: AmqpFieldMapping(null, "active")]
void ChannelFlow(bool active);
- ///<summary>(Spec method) Convenience method, asking for
- ///non-exclusive access to all capabilities within a
- ///realm.</summary>
- ///<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.
- ///</remarks>
- [AmqpMethodDoNotImplement(null)]
- ushort AccessRequest(string realm);
-
- ///<summary>(Spec method) Retrieve an access ticket
- ///("capability") for a realm.</summary>
- ///<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.
- ///</remarks>
- [AmqpMethodDoNotImplement(null)]
- ushort AccessRequest(string realm,
- bool exclusive,
- bool passive,
- bool active,
- bool write,
- bool read);
-
///<summary>(Spec method) Declare an exchange.</summary>
///<remarks>
///The exchange is declared non-passive, non-autodelete, and
///exercised.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- void ExchangeDeclare(ushort ticket, string exchange, string type, bool durable);
+ void ExchangeDeclare(string exchange, string type, bool durable);
///<summary>(Spec method) Declare an exchange.</summary>
///<remarks>
///exercised.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- void ExchangeDeclare(ushort ticket, string exchange, string type);
+ void ExchangeDeclare(string exchange, string type);
///<summary>(Spec method) Declare an exchange.</summary>
- void ExchangeDeclare(ushort ticket,
- string exchange,
+ void ExchangeDeclare(string exchange,
string type,
bool passive,
bool durable,
IDictionary arguments);
///<summary>(Spec method) Delete an exchange.</summary>
- void ExchangeDelete(ushort ticket,
- string exchange,
+ void ExchangeDelete(string exchange,
bool ifUnused,
[AmqpNowaitArgument(null)]
bool nowait);
///name is the return value of this method.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string QueueDeclare(ushort ticket);
+ string QueueDeclare();
///<summary>(Spec method) Declare a queue.</summary>
///<remarks>
///non-exclusive, and non-autodelete, with no arguments.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string QueueDeclare(ushort ticket,
- string queue);
+ string QueueDeclare(string queue);
///<summary>(Spec method) Declare a queue.</summary>
///<remarks>
///non-autodelete, with no arguments.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string QueueDeclare(ushort ticket,
- string queue,
+ string QueueDeclare(string queue,
bool durable);
///<summary>(Spec method) Declare a queue.</summary>
///Returns the name of the queue that was declared.
///</remarks>
[return: AmqpFieldMapping(null, "queue")]
- string QueueDeclare(ushort ticket,
- string queue,
+ string QueueDeclare(string queue,
bool passive,
bool durable,
bool exclusive,
IDictionary arguments);
///<summary>(Spec method) Bind a queue to an exchange.</summary>
- void QueueBind(ushort ticket,
- string queue,
+ void QueueBind(string queue,
string exchange,
string routingKey,
[AmqpNowaitArgument(null)]
///<summary>(Spec method) Unbind a queue from an exchange.</summary>
///<remarks>
///Note: This operation is only supported when communicating
- ///using AMQP protocol version 0-9.
+ ///using AMQP protocol version 0-9, or when communicating with
+ ///a 0-8 broker that has been enhanced with the unofficial
+ ///addition of a queue.unbind method.
///</remarks>
- [AmqpUnsupported("RabbitMQ.Client.Framing.v0_8")]
[AmqpUnsupported("RabbitMQ.Client.Framing.v0_8qpid")]
- void QueueUnbind(ushort ticket,
- string queue,
+ void QueueUnbind(string queue,
string exchange,
string routingKey,
IDictionary arguments);
///specified, returns <code>uint.MaxValue</code>.
///</remarks>
[return: AmqpFieldMapping(null, "messageCount")]
- uint QueuePurge(ushort ticket,
- string queue,
+ uint QueuePurge(string queue,
[AmqpNowaitArgument(null, "0xFFFFFFFF")]
bool nowait);
///<code>uint.MaxValue</code>.
///</remarks>
[return: AmqpFieldMapping(null, "messageCount")]
- uint QueueDelete(ushort ticket,
- string queue,
+ uint QueueDelete(string queue,
bool ifUnused,
bool ifEmpty,
[AmqpNowaitArgument(null, "0xFFFFFFFF")]
///noLocal=false and exclusive=false.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string BasicConsume(ushort ticket,
- string queue,
+ string BasicConsume(string queue,
IDictionary filter,
IBasicConsumer consumer);
///noLocal=false and exclusive=false.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string BasicConsume(ushort ticket,
- string queue,
+ string BasicConsume(string queue,
bool noAck,
IDictionary filter,
IBasicConsumer consumer);
///noLocal=false and exclusive=false.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- string BasicConsume(ushort ticket,
- string queue,
+ string BasicConsume(string queue,
bool noAck,
string consumerTag,
IDictionary filter,
///<summary>Start a Basic content-class consumer.</summary>
[AmqpMethodDoNotImplement(null)]
- string BasicConsume(ushort ticket,
- string queue,
+ string BasicConsume(string queue,
bool noAck,
string consumerTag,
bool noLocal,
///The publication occurs with mandatory=false and immediate=false.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- void BasicPublish(ushort ticket,
- PublicationAddress addr,
+ void BasicPublish(PublicationAddress addr,
IBasicProperties basicProperties,
byte[] body);
///The publication occurs with mandatory=false and immediate=false.
///</remarks>
[AmqpMethodDoNotImplement(null)]
- void BasicPublish(ushort ticket,
- string exchange,
+ void BasicPublish(string exchange,
string routingKey,
IBasicProperties basicProperties,
byte[] body);
///<summary>(Spec method) Publish a message using the Basic
///content-class.</summary>
[AmqpMethodDoNotImplement(null)]
- void BasicPublish(ushort ticket,
- string exchange,
+ void BasicPublish(string exchange,
string routingKey,
bool mandatory,
bool immediate,
///no messages are currently available. See also
///IModel.BasicAck.</summary>
[AmqpMethodDoNotImplement(null)]
- BasicGetResult BasicGet(ushort ticket,
- string queue,
+ BasicGetResult BasicGet(string queue,
bool noAck);
///<summary>(Spec method) Enable TX mode for this session.</summary>
///<summary>Close this session.</summary>
///<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.
+ ///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.
+ ///</remarks>
+ [AmqpMethodDoNotImplement(null)]
+ void Close();
+
+ ///<summary>Close this session.</summary>
+ ///<remarks>
+ ///The method behaves in the same way as Close(), with the only
+ ///difference that the model is closed with the given model
+ ///close code and message.
+ ///<para>
+ ///The close code (See under "Reply Codes" in the AMQP specification)
+ ///</para>
+ ///<para>
+ ///A message indicating the reason for closing the model
+ ///</para>
///</remarks>
[AmqpMethodDoNotImplement(null)]
void Close(ushort replyCode, string replyText);
+
+ ///<summary>Abort this session.</summary>
+ ///<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.
+ ///In comparison to normal Close() method, Abort() will not throw
+ ///AlreadyClosedException or IOException during closing model.
+ ///</remarks>
+ [AmqpMethodDoNotImplement(null)]
+ void Abort();
+
+ ///<summary>Abort this session.</summary>
+ ///<remarks>
+ ///The method behaves in the same way as Abort(), with the only
+ ///difference that the model is closed with the given model
+ ///close code and message.
+ ///<para>
+ ///The close code (See under "Reply Codes" in the AMQP specification)
+ ///</para>
+ ///<para>
+ ///A message indicating the reason for closing the model
+ ///</para>
+ ///</remarks>
+ [AmqpMethodDoNotImplement(null)]
+ void Abort(ushort replyCode, string replyText);
}
///<summary>Represents Basic.GetOk responses from the server.</summary>
///<see cref="RabbitMQ.Client.Framing.Impl.v0_9.Model"/>
public interface IFullModel : RabbitMQ.Client.IModel
{
- ///<summary>Used to send an Access.Request method. Called by
- ///the public API after checking whether our peer's
- ///implementation can actually handle access
- ///requests.</summary>
- [AmqpMethodMapping(null, "access", "request")]
- [return: AmqpFieldMapping(null, "ticket")]
- ushort _Private_AccessRequest(string realm,
- bool exclusive,
- bool passive,
- bool active,
- bool write,
- bool read);
-
///<summary>Used to send a Basic.Publish method. Called by the
///public publish method after potential null-reference issues
///have been rectified.</summary>
[AmqpMethodMapping(null, "basic", "publish")]
- void _Private_BasicPublish(ushort ticket,
- string exchange,
+ void _Private_BasicPublish(string exchange,
string routingKey,
bool mandatory,
bool immediate,
///datastructures.</summary>
[AmqpForceOneWay]
[AmqpMethodMapping(null, "basic", "consume")]
- void _Private_BasicConsume(ushort ticket,
- string queue,
+ void _Private_BasicConsume(string queue,
string consumerTag,
bool noLocal,
bool noAck,
///required.</summary>
[AmqpForceOneWay]
[AmqpMethodMapping(null, "basic", "get")]
- void _Private_BasicGet(ushort ticket,
- string queue,
+ void _Private_BasicGet(string queue,
bool noAck);
///<summary>Handle incoming Basic.GetOk methods. Routes the
IBasicProperties basicProperties,
[AmqpContentBodyMapping]
byte[] body);
+
+ ///<summary>Used to send a Channel.FlowOk. Confirms that
+ ///Channel.Flow from the broker was processed.</summary>
+ [AmqpMethodMapping(null, "channel", "flow-ok")]
+ void _Private_ChannelFlowOk();
+
+ ///<summary>Handle incoming Channel.Flow methods. Either
+ ///stops or resumes sending the methods that have content.</summary>
+ void HandleChannelFlow(bool active);
///<summary>Handle an incoming Channel.Close. Shuts down the
///session and model.</summary>