activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r898485 - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp: Connection.cs ConnectionFactory.cs Session.cs
Date Tue, 12 Jan 2010 19:48:45 GMT
Author: tabish
Date: Tue Jan 12 19:48:45 2010
New Revision: 898485

URL: http://svn.apache.org/viewvc?rev=898485&view=rev
Log:
Add the dispatchAsync property back to connection.

Modified:
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs
    activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs?rev=898485&r1=898484&r2=898485&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs Tue Jan
12 19:48:45 2010
@@ -42,6 +42,8 @@
         private bool alwaysSyncSend = false;
         private bool copyMessageOnSend = true;
         private bool sendAcksAsync = false;
+        private bool dispatchAsync = true;
+        private string transformation = null;
         private IRedeliveryPolicy redeliveryPolicy;
         private PrefetchPolicy prefetchPolicy = new PrefetchPolicy();
 
@@ -172,6 +174,27 @@
             set { sendAcksAsync = value; }
         }
 
+        /// <summary>
+        /// synchronously or asynchronously by the broker.  Set to false for a slow
+        /// consumer and true for a fast consumer.
+        /// </summary>
+        public bool DispatchAsync
+        {
+            get { return this.dispatchAsync; }
+            set { this.dispatchAsync = value; }
+        }
+
+        /// <summary>
+        /// Sets the default Transformation attribute applied to Consumers.  If a consumer
+        /// is to receive Map messages from the Broker then the user should set the "jms-map-xml"
+        /// transformation on the consumer so that all MapMessages are sent as XML.
+        /// </summary>
+        public string Transformation
+        {
+            get { return this.transformation; }
+            set { this.transformation = value; }
+        }
+
         public IConnectionMetaData MetaData
         {
             get { return this.metaData ?? (this.metaData = new ConnectionMetaData()); }
@@ -311,7 +334,7 @@
         public ISession CreateSession(AcknowledgementMode sessionAcknowledgementMode)
         {
             SessionInfo info = CreateSessionInfo(sessionAcknowledgementMode);
-            Session session = new Session(this, info, sessionAcknowledgementMode);
+            Session session = new Session(this, info, sessionAcknowledgementMode, this.dispatchAsync);
 
             // Set properties on session using parameters prefixed with "session."
             URISupport.CompositeData c = URISupport.parseComposite(this.brokerUri);

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs?rev=898485&r1=898484&r2=898485&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ConnectionFactory.cs Tue
Jan 12 19:48:45 2010
@@ -45,6 +45,7 @@
         private bool asyncSend;
         private bool alwaysSyncSend;
         private bool sendAcksAsync=true;
+        private bool dispatchAsync=true;
         private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
 
         private IRedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
@@ -224,6 +225,12 @@
             set { this.acknowledgementMode = NMSConvert.ToAcknowledgementMode(value); }
         }
 
+        public bool DispatchAsync
+        {
+            get { return this.dispatchAsync; }
+            set { this.dispatchAsync = value; }
+        }
+
         public AcknowledgementMode AcknowledgementMode
         {
             get { return acknowledgementMode; }
@@ -292,6 +299,7 @@
             connection.CopyMessageOnSend = this.CopyMessageOnSend;
             connection.AlwaysSyncSend = this.AlwaysSyncSend;
             connection.SendAcksAsync = this.SendAcksAsync;
+            connection.DispatchAsync = this.DispatchAsync;
             connection.AcknowledgementMode = this.acknowledgementMode;
             connection.RedeliveryPolicy = this.redeliveryPolicy.Clone() as IRedeliveryPolicy;
             connection.PrefetchPolicy = this.prefetchPolicy.Clone() as PrefetchPolicy;

Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs?rev=898485&r1=898484&r2=898485&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs Tue Jan 12
19:48:45 2010
@@ -56,12 +56,13 @@
         private TimeSpan requestTimeout = Apache.NMS.NMSConstants.defaultRequestTimeout;
         private AcknowledgementMode acknowledgementMode;
 
-        public Session(Connection connection, SessionInfo info, AcknowledgementMode acknowledgementMode)
+        public Session(Connection connection, SessionInfo info, AcknowledgementMode acknowledgementMode,
bool dispatchAsync)
         {
             this.connection = connection;
             this.info = info;
             this.acknowledgementMode = acknowledgementMode;
             this.requestTimeout = connection.RequestTimeout;
+            this.dispatchAsync = dispatchAsync;
 
             if(acknowledgementMode == AcknowledgementMode.Transactional)
             {
@@ -74,7 +75,7 @@
 
             this.executor = new SessionExecutor(this, this.consumers);
         }
-
+        
         ~Session()
         {
             Dispose(false);



Mime
View raw message