diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2007-06-28 08:09:20 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2007-06-28 08:09:20 +0000 |
| commit | 79cd6c772da003ddc917eff362f9adaa99e28b49 (patch) | |
| tree | bbb1e4b46add9a52f4eb15afe83fb16b5ff6af66 /dotnet/Qpid.Client/Client/BasicMessageProducer.cs | |
| parent | e1de334597e23b55c9e91c1f853f52e8313ba103 (diff) | |
| download | qpid-python-79cd6c772da003ddc917eff362f9adaa99e28b49.tar.gz | |
Merged revisions 539783-539788 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2
........
r539783 | tomasr | 2007-05-19 18:40:32 +0100 (Sat, 19 May 2007) | 8 lines
* QPID-495 (Contributed by Carlos Medina) Implement default timeouts for AttainState and SyncWrite
* Fix method signatures
* Remove SSL test with client-side certificates (requires extra setup)
* Add locks AMSQtateManager and AMQProtocolListener to prevent modification of listener collections while processing notifications
* Add library/runtime information to ConnectionStartMethodHandler
* Fix some compiler warnings
* Added XML documentation for some api interfaces
........
r539788 | tomasr | 2007-05-19 19:55:33 +0100 (Sat, 19 May 2007) | 1 line
* Excluded failover tests from nant builds and SSL tests on mono
........
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551497 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client/Client/BasicMessageProducer.cs')
| -rw-r--r-- | dotnet/Qpid.Client/Client/BasicMessageProducer.cs | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/dotnet/Qpid.Client/Client/BasicMessageProducer.cs b/dotnet/Qpid.Client/Client/BasicMessageProducer.cs index fd430694df..c1af826102 100644 --- a/dotnet/Qpid.Client/Client/BasicMessageProducer.cs +++ b/dotnet/Qpid.Client/Client/BasicMessageProducer.cs @@ -44,7 +44,7 @@ namespace Qpid.Client /// <summary> /// Time to live of messages. Specified in milliseconds but AMQ has 1 second resolution. - /// + /// </summary> private long _timeToLive; /// <summary> @@ -88,17 +88,6 @@ namespace Qpid.Client /// </summary> private AmqChannel _channel; - /// <summary> - /// Default value for immediate flag is false, i.e. a consumer does not need to be attached to a queue - /// </summary> - protected const bool DEFAULT_IMMEDIATE = false; - - /// <summary> - /// Default value for mandatory flag is true, i.e. server will not silently drop messages where no queue is - /// connected to the exchange for the message - /// </summary> - protected const bool DEFAULT_MANDATORY = true; - public BasicMessageProducer(string exchangeName, string routingKey, bool transacted, ushort channelId, @@ -206,15 +195,31 @@ namespace Qpid.Client public void Send(IMessage msg, DeliveryMode deliveryMode, int priority, long timeToLive) { CheckNotClosed(); - SendImpl(_exchangeName, _routingKey, (AbstractQmsMessage)msg, deliveryMode, priority, (uint)timeToLive, DEFAULT_MANDATORY, - DEFAULT_IMMEDIATE); + SendImpl( + _exchangeName, + _routingKey, + (AbstractQmsMessage)msg, + deliveryMode, + priority, + (uint)timeToLive, + _mandatory, + _immediate + ); } public void Send(IMessage msg) { CheckNotClosed(); - SendImpl(_exchangeName, _routingKey, (AbstractQmsMessage)msg, _deliveryMode, _messagePriority, (uint)_timeToLive, - DEFAULT_MANDATORY, DEFAULT_IMMEDIATE); + SendImpl( + _exchangeName, + _routingKey, + (AbstractQmsMessage)msg, + _deliveryMode, + _messagePriority, + (uint)_timeToLive, + _mandatory, + _immediate + ); } // This is a short-term hack (knowing that this code will be re-vamped sometime soon) @@ -222,8 +227,16 @@ namespace Qpid.Client public void Send(IMessage msg, bool mandatory) { CheckNotClosed(); - SendImpl(_exchangeName, _routingKey, (AbstractQmsMessage)msg, _deliveryMode, _messagePriority, (uint)_timeToLive, - mandatory, DEFAULT_IMMEDIATE); + SendImpl( + _exchangeName, + _routingKey, + (AbstractQmsMessage)msg, + _deliveryMode, + _messagePriority, + (uint)_timeToLive, + mandatory, + _immediate + ); } public long TimeToLive @@ -248,6 +261,11 @@ namespace Qpid.Client public string MimeType { + get + { + CheckNotClosed(); + return _mimeType; + } set { CheckNotClosed(); @@ -257,6 +275,11 @@ namespace Qpid.Client public string Encoding { + get + { + CheckNotClosed(); + return _encoding; + } set { CheckNotClosed(); |
