activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r367583 - in /incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client: ./ Core/
Date Tue, 10 Jan 2006 12:26:24 GMT
Author: jstrachan
Date: Tue Jan 10 04:26:05 2006
New Revision: 367583

URL: http://svn.apache.org/viewcvs?rev=367583&view=rev
Log:
moved the Transport API into the Core package and put an initial JMS-like API in place

Added:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs   (with props)
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs  
(with props)
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs   (with
props)
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs   (with props)
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IDestination.cs
      - copied, changed from r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Destination.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IQueue.cs
      - copied, changed from r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Queue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs   (with props)
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryQueue.cs
      - copied, changed from r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryTopic.cs
      - copied, changed from r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITopic.cs
      - copied, changed from r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Topic.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs   (with props)
Removed:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Destination.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Queue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Topic.cs
Modified:
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs
    incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs Tue Jan 10
04:26:05 2006
@@ -0,0 +1,56 @@
+using System;
+using System.Collections;
+using OpenWire.Client.Commands;
+using OpenWire.Client.Core;
+
+namespace OpenWire.Client {
+        /// <summary>
+        /// Represents a connection with a message broker
+        /// </summary>
+        public class Connection : IConnection {
+
+                private Transport transport;
+                IList sessions = new ArrayList();
+                private bool transacted;
+                private AcknowledgementMode acknowledgementMode;
+
+                /// <summary>
+                /// Creates a new session to work on this connection
+                /// </summary>
+                public ISession CreateSession() {
+                        return CreateSession(transacted, acknowledgementMode); 
+                }
+
+                /// <summary>
+                /// Creates a new session to work on this connection
+                /// </summary>
+                public ISession CreateSession(bool transacted, AcknowledgementMode acknowledgementMode)
{
+                        Session session = new Session(this, acknowledgementMode);
+                        sessions.Add(session);
+                        return session; 
+                }
+
+                public void Dispose() {
+                        foreach (Session session in sessions) {
+                                session.Dispose();
+                        }
+                }
+
+                // Properties
+
+                public Transport Transport {
+                        get { return transport; }
+                        set { this.transport = value; } 
+                }
+
+                public bool Transacted {
+                        get { return transacted; }
+                        set { this.transacted = value; } 
+                }
+
+                public AcknowledgementMode AcknowledgementMode {
+                        get { return acknowledgementMode; }
+                        set { this.acknowledgementMode = value; } 
+                } 
+        } 
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Connection.cs
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs?rev=367583&r1=367582&r2=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs
Tue Jan 10 04:26:05 2006
@@ -7,7 +7,7 @@
         /// <summary>
         /// Summary description for ActiveMQDestination.
         /// </summary>
-        public abstract class ActiveMQDestination : AbstractCommand, Destination {
+        public abstract class ActiveMQDestination : AbstractCommand, IDestination {
 
                 /**
                  * Topic Destination object
@@ -165,7 +165,7 @@
                  * @return a descriptive string for this queue or topic
                  */
                 public static String Inspect(ActiveMQDestination destination) {
-                        if (destination is Topic) {
+                        if (destination is ITopic) {
                                 return "Topic(" + destination.ToString() + ")"; 
                         } else {
                                 return "Queue(" + destination.ToString() + ")"; 
@@ -177,20 +177,20 @@
                  * @return @throws JMSException
                  * @throws javax.jms.JMSException
                  */
-                public static ActiveMQDestination transformDestination(Destination destination)
{
+                public static ActiveMQDestination transformDestination(IDestination destination)
{
                         ActiveMQDestination result = null;
                         if (destination != null) {
                                 if (destination is ActiveMQDestination) {
                                         result = (ActiveMQDestination) destination; 
                                 } else {
-                                        if (destination is TemporaryQueue) {
-                                                result = new ActiveMQTempQueue(((Queue) destination).QueueName);

-                                        } else if (destination is TemporaryTopic) {
-                                                result = new ActiveMQTempTopic(((Topic) destination).TopicName);

-                                        } else if (destination is Queue) {
-                                                result = new ActiveMQQueue(((Queue) destination).QueueName);

-                                        } else if (destination is Topic) {
-                                                result = new ActiveMQTopic(((Topic) destination).TopicName);

+                                        if (destination is ITemporaryQueue) {
+                                                result = new ActiveMQTempQueue(((IQueue)
destination).QueueName); 
+                                        } else if (destination is ITemporaryTopic) {
+                                                result = new ActiveMQTempTopic(((ITopic)
destination).TopicName); 
+                                        } else if (destination is IQueue) {
+                                                result = new ActiveMQQueue(((IQueue) destination).QueueName);

+                                        } else if (destination is ITopic) {
+                                                result = new ActiveMQTopic(((ITopic) destination).TopicName);

                                         } 
                                 } 
                         }

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs?rev=367583&r1=367582&r2=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs Tue
Jan 10 04:26:05 2006
@@ -7,7 +7,7 @@
         /// <summary>
         /// Summary description for ActiveMQQueue.
         /// </summary>
-        public class ActiveMQQueue : ActiveMQDestination, Queue {
+        public class ActiveMQQueue : ActiveMQDestination, IQueue {
                 public const byte ID_ActiveMQQueue = 100;
 
                 public ActiveMQQueue() : base() {

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs?rev=367583&r1=367582&r2=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs
Tue Jan 10 04:26:05 2006
@@ -7,7 +7,7 @@
         /// <summary>
         /// Summary description for ActiveMQTempQueue.
         /// </summary>
-        public class ActiveMQTempQueue : ActiveMQDestination, TemporaryQueue {
+        public class ActiveMQTempQueue : ActiveMQDestination, ITemporaryQueue {
                 public const byte ID_ActiveMQTempQueue = 102;
 
                 public ActiveMQTempQueue() : base() {

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs?rev=367583&r1=367582&r2=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs
(original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs
Tue Jan 10 04:26:05 2006
@@ -7,7 +7,7 @@
         /// <summary>
         /// Summary description for ActiveMQTempTopic.
         /// </summary>
-        public class ActiveMQTempTopic : ActiveMQDestination, TemporaryTopic {
+        public class ActiveMQTempTopic : ActiveMQDestination, ITemporaryTopic {
                 public const byte ID_ActiveMQTempTopic = 103;
 
                 public ActiveMQTempTopic() : base() {

Modified: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs?rev=367583&r1=367582&r2=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs Tue
Jan 10 04:26:05 2006
@@ -7,7 +7,7 @@
         /// <summary>
         /// Summary description for ActiveMQTopic.
         /// </summary>
-        public class ActiveMQTopic : ActiveMQDestination, Topic {
+        public class ActiveMQTopic : ActiveMQDestination, ITopic {
                 public const byte ID_ActiveMQTopic = 101;
 
                 public ActiveMQTopic() : base() {

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs Tue
Jan 10 04:26:05 2006
@@ -0,0 +1,44 @@
+using System;
+using System.Threading;
+
+using OpenWire.Client;
+using OpenWire.Client.Commands;
+
+namespace OpenWire.Client.Core {
+        /// <summary>
+        /// Handles asynchronous responses
+        /// </summary>
+        public class FutureResponse : IAsyncResult {
+
+                private Response response;
+                private Mutex asyncWaitHandle = new Mutex();
+                private bool isCompleted;
+
+                public WaitHandle AsyncWaitHandle {
+                        get { return asyncWaitHandle; } 
+                }
+
+                public object AsyncState {
+                        get { return response; }
+                        set { response = (Response) value; } 
+                }
+
+                public bool IsCompleted {
+                        get { return isCompleted; } 
+                }
+
+                public bool CompletedSynchronously {
+                        get { return false; } 
+                }
+
+                public Response Response {
+                        get { return response; }
+                        set {
+                                asyncWaitHandle.WaitOne();
+                                response = value;
+                                isCompleted = true;
+                                asyncWaitHandle.ReleaseMutex();
+                        }
+                } 
+        } 
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/FutureResponse.cs
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs Tue Jan
10 04:26:05 2006
@@ -0,0 +1,25 @@
+using System;
+
+using OpenWire.Client;
+using OpenWire.Client.Commands;
+using OpenWire.Client.Core;
+
+namespace OpenWire.Client.Core {
+        
+        public delegate void CommandHandler(Transport sender, Command command);
+        public delegate void ExceptionHandler(Transport sender, Exception command);
+
+        /// <summary>
+        /// Represents the logical networking transport layer.
+        /// </summary>
+        public interface Transport {
+                void Oneway(Command command);
+
+                FutureResponse AsyncRequest(Command command);
+
+                Response Request(Command command);
+
+                event CommandHandler Command;
+                event ExceptionHandler Exception; 
+        } 
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Core/Transport.cs
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs Tue Jan 10
04:26:05 2006
@@ -0,0 +1,39 @@
+using System;
+using OpenWire.Client.Commands;
+
+namespace OpenWire.Client {
+
+        public enum AcknowledgementMode {
+                Unknown, AutoAcknowledge, ClientAcknowledge, Transactional 
+        }
+
+
+        /// <summary>
+        /// Represents a connection with a message broker
+        /// </summary>
+        public interface IConnection : IDisposable {
+
+                /// <summary>
+                /// Creates a new session to work on this connection
+                /// </summary>
+                ISession CreateSession();
+
+                /// <summary>
+                /// Creates a new session to work on this connection
+                /// </summary>
+                ISession CreateSession(bool transacted, AcknowledgementMode acknowledgementMode);
+
+
+                // Properties
+
+                bool Transacted {
+                        get;
+                        set; 
+                }
+
+                AcknowledgementMode AcknowledgementMode {
+                        get;
+                        set; 
+                } 
+        }
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IConnection.cs
------------------------------------------------------------------------------
    svn:executable = *

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IDestination.cs (from
r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Destination.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IDestination.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IDestination.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Destination.cs&r1=367570&r2=367583&rev=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Destination.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IDestination.cs Tue Jan 10
04:26:05 2006
@@ -5,6 +5,6 @@
         /// <summary>
         /// Summary description for Destination.
         /// </summary>
-        public interface Destination {
+        public interface IDestination {
         } 
 }

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IQueue.cs (from r367570,
incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Queue.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IQueue.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IQueue.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Queue.cs&r1=367570&r2=367583&rev=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Queue.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/IQueue.cs Tue Jan 10 04:26:05
2006
@@ -3,9 +3,9 @@
 
 namespace OpenWire.Client {
         /// <summary>
-        /// Summary description for Queue.
+        /// Summary description for IQueue.
         /// </summary>
-        public interface Queue : Destination {
+        public interface IQueue : IDestination {
 
                 String QueueName {
                         get; 

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs Tue Jan 10 04:26:05
2006
@@ -0,0 +1,11 @@
+using System;
+using OpenWire.Client.Commands;
+
+namespace OpenWire.Client {
+        /// <summary>
+        /// Represents a single unit of work on an IConnection.
+        /// So the ISession can be used to perform transactional receive and sends
+        /// </summary>
+        public interface ISession {
+        } 
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ISession.cs
------------------------------------------------------------------------------
    svn:executable = *

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryQueue.cs (from
r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryQueue.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryQueue.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs&r1=367570&r2=367583&rev=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryQueue.cs Tue Jan
10 04:26:05 2006
@@ -3,8 +3,8 @@
 
 namespace OpenWire.Client {
         /// <summary>
-        /// Summary description for TemporaryQueue.
+        /// Summary description for ITemporaryQueue.
         /// </summary>
-        public interface TemporaryQueue : Destination {
+        public interface ITemporaryQueue : IDestination {
         } 
 }

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryTopic.cs (from
r367570, incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryTopic.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryTopic.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs&r1=367570&r2=367583&rev=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITemporaryTopic.cs Tue Jan
10 04:26:05 2006
@@ -5,6 +5,6 @@
         /// <summary>
         /// Summary description for TemporaryTopic.
         /// </summary>
-        public interface TemporaryTopic : Destination {
+        public interface ITemporaryTopic : IDestination {
         } 
 }

Copied: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITopic.cs (from r367570,
incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Topic.cs)
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITopic.cs?p2=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITopic.cs&p1=incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Topic.cs&r1=367570&r2=367583&rev=367583&view=diff
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Topic.cs (original)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/ITopic.cs Tue Jan 10 04:26:05
2006
@@ -3,9 +3,9 @@
 
 namespace OpenWire.Client {
         /// <summary>
-        /// Summary description for Topic.
+        /// Summary description for ITopic.
         /// </summary>
-        public interface Topic : Destination {
+        public interface ITopic : IDestination {
 
                 String TopicName {
                         get; 

Added: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs?rev=367583&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs (added)
+++ incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs Tue Jan 10 04:26:05
2006
@@ -0,0 +1,28 @@
+using System;
+using OpenWire.Client.Commands;
+using OpenWire.Client.Core;
+
+namespace OpenWire.Client {
+        /// <summary>
+        /// Default provider of ISession
+        /// </summary>
+        public class Session : ISession, IDisposable {
+                private Connection connection;
+                private AcknowledgementMode acknowledgementMode;
+
+                public Session(Connection connection, AcknowledgementMode acknowledgementMode)
{
+                        this.connection = connection;
+                        this.acknowledgementMode = acknowledgementMode; 
+                }
+
+                public void Dispose() {
+                } 
+                
+                public void Acknowledge(Message message) {
+                        if (acknowledgementMode == AcknowledgementMode.ClientAcknowledge)
{
+                                MessageAck ack = new MessageAck();
+                                connection.Transport.Request(ack);
+                        }
+                }
+        } 
+}

Propchange: incubator/activemq/trunk/openwire-dotnet/src/OpenWire.Client/Session.cs
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message