Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 93359 invoked from network); 4 Dec 2009 22:54:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 22:54:08 -0000 Received: (qmail 70575 invoked by uid 500); 4 Dec 2009 22:54:08 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 70522 invoked by uid 500); 4 Dec 2009 22:54:07 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 70512 invoked by uid 99); 4 Dec 2009 22:54:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 22:54:07 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 22:54:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C8CF123889D0; Fri, 4 Dec 2009 22:53:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r887420 [1/3] - in /activemq/activemq-dotnet/Apache.NMS.Stomp/trunk: ./ src/main/csharp/ src/main/csharp/Commands/ src/main/csharp/Threads/ Date: Fri, 04 Dec 2009 22:53:42 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091204225343.C8CF123889D0@eris.apache.org> Author: tabish Date: Fri Dec 4 22:53:41 2009 New Revision: 887420 URL: http://svn.apache.org/viewvc?rev=887420&view=rev Log: Fixing some compiler errors and bringing in more NMS Implementation for Stomp. Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageConsumer.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/MessageProducer.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/PrefetchPolicy.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Session.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/SessionExecutor.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/DedicatedTaskRunner.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/Task.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/TaskRunner.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Threads/TaskRunnerFactory.cs (with props) activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/TransactionContext.cs (with props) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseCommand.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Command.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Queue.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempQueue.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempTopic.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Topic.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Connection.cs activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/vs2008-stomp.csproj Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseCommand.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseCommand.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseCommand.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseCommand.cs Fri Dec 4 22:53:41 2009 @@ -15,15 +15,6 @@ * limitations under the License. */ -// -// Marshalling code for Open Wire Format for BaseCommand -// -// -// NOTE!: This file is autogenerated - do not modify! -// if you need to make a change, please see the Groovy scripts in the -// activemq-openwire module -// - using System; namespace Apache.NMS.Stomp.Commands @@ -57,7 +48,7 @@ public override String ToString() { - string answer = GetDataStructureTypeAsString(GetDataStructureType()); + string answer = DataStructureTypes.GetDataStructureTypeAsString(GetDataStructureType()); if(answer.Length == 0) { answer = base.ToString(); @@ -65,69 +56,6 @@ return answer + ": id = " + CommandId; } - public static String GetDataStructureTypeAsString(int type) - { - String packetTypeStr = ""; - switch(type) - { - case ActiveMQMessage.ID_ACTIVEMQMESSAGE: - packetTypeStr = "ACTIVEMQ_MESSAGE"; - break; - case ActiveMQTextMessage.ID_ACTIVEMQTEXTMESSAGE: - packetTypeStr = "ACTIVEMQ_TEXT_MESSAGE"; - break; - case ActiveMQObjectMessage.ID_ACTIVEMQOBJECTMESSAGE: - packetTypeStr = "ACTIVEMQ_OBJECT_MESSAGE"; - break; - case ActiveMQBytesMessage.ID_ACTIVEMQBYTESMESSAGE: - packetTypeStr = "ACTIVEMQ_BYTES_MESSAGE"; - break; - case ActiveMQStreamMessage.ID_ACTIVEMQSTREAMMESSAGE: - packetTypeStr = "ACTIVEMQ_STREAM_MESSAGE"; - break; - case ActiveMQMapMessage.ID_ACTIVEMQMAPMESSAGE: - packetTypeStr = "ACTIVEMQ_MAP_MESSAGE"; - break; - case MessageAck.ID_MESSAGEACK: - packetTypeStr = "ACTIVEMQ_MSG_ACK"; - break; - case Response.ID_RESPONSE: - packetTypeStr = "RESPONSE"; - break; - case ConsumerInfo.ID_CONSUMERINFO: - packetTypeStr = "CONSUMER_INFO"; - break; - case ProducerInfo.ID_PRODUCERINFO: - packetTypeStr = "PRODUCER_INFO"; - break; - case TransactionInfo.ID_TRANSACTIONINFO: - packetTypeStr = "TRANSACTION_INFO"; - break; - case BrokerInfo.ID_BROKERINFO: - packetTypeStr = "BROKER_INFO"; - break; - case ConnectionInfo.ID_CONNECTIONINFO: - packetTypeStr = "CONNECTION_INFO"; - break; - case SessionInfo.ID_SESSIONINFO: - packetTypeStr = "SESSION_INFO"; - break; - case RemoveSubscriptionInfo.ID_REMOVESUBSCRIPTIONINFO: - packetTypeStr = "DURABLE_UNSUBSCRIBE"; - break; - case IntegerResponse.ID_INTEGERRESPONSE: - packetTypeStr = "INT_RESPONSE_RECEIPT_INFO"; - break; - case WireFormatInfo.ID_WIREFORMATINFO: - packetTypeStr = "WIRE_FORMAT_INFO"; - break; - case RemoveInfo.ID_REMOVEINFO: - packetTypeStr = "REMOVE_INFO"; - break; - } - return packetTypeStr; - } - public virtual bool IsBrokerInfo { get @@ -264,7 +192,7 @@ } } - public virtual bool IsWireFormatInfo + public virtual bool IsErrorCommand { get { Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BaseMessage.cs Fri Dec 4 22:53:41 2009 @@ -24,8 +24,6 @@ { public class BaseMessage : BaseCommand, MarshallAware, ICloneable { - public const byte ID_MESSAGE = 0; - ProducerId producerId; Destination destination; TransactionId transactionId; @@ -52,17 +50,6 @@ /// /// - /// Get the unique identifier that this object and its own - /// Marshaler share. - /// - /// - public override byte GetDataStructureType() - { - return ID_MESSAGE; - } - - /// - /// /// Clone this object and return a new instance that the caller now owns. /// /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BrokerError.cs Fri Dec 4 22:53:41 2009 @@ -38,6 +38,11 @@ private StackTraceElement[] stackTraceElements = {}; private BrokerError cause; + public override byte GetDataStructureType() + { + return DataStructureTypes.ErrorType; + } + public string Message { get { return message; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/BytesMessage.cs Fri Dec 4 22:53:41 2009 @@ -25,8 +25,6 @@ { public class BytesMessage : Message, IBytesMessage { - public const byte ID_ACTIVEMQBYTESMESSAGE = 24; - private EndianBinaryReader dataIn = null; private EndianBinaryWriter dataOut = null; private MemoryStream outputBuffer = null; @@ -34,7 +32,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQBYTESMESSAGE; + return DataStructureTypes.BytesMessageType; } public override Object Clone() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Command.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Command.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Command.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Command.cs Fri Dec 4 22:53:41 2009 @@ -41,11 +41,6 @@ get; } - bool IsConnectedCommand - { - get; - } - bool IsErrorCommand { get; Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionId.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class ConnectionId : BaseDataStructure { - public const byte ID_CONNECTIONID = 120; - string value; public ConnectionId() @@ -53,7 +51,7 @@ /// public override byte GetDataStructureType() { - return ID_CONNECTIONID; + return DataStructureTypes.ConnectionIdType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ConnectionInfo.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class ConnectionInfo : BaseCommand { - public const byte ID_CONNECTIONINFO = 3; - ConnectionId connectionId; string clientId; string password; @@ -37,7 +35,7 @@ /// public override byte GetDataStructureType() { - return ID_CONNECTIONINFO; + return DataStructureTypes.ConnectionInfoType; } /// Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs?rev=887420&view=auto ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs Fri Dec 4 22:53:41 2009 @@ -0,0 +1,153 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace Apache.NMS.Stomp.Commands +{ + public class DataStructureTypes + { + public const byte ErrorType = 0; + + public const byte MessageType = 1; + public const byte BytesMessageType = 2; + public const byte MapMessageType = 3; + public const byte StreamMessageType = 4; + public const byte TextMessageType = 5; + + public const byte MessageDispatchType = 9; + public const byte MessageIdType = 10; + public const byte MessageAckType = 11; + + public const byte ConnectionInfoType = 12; + public const byte ConnectionIdType = 13; + public const byte ConsumerInfoType = 14; + public const byte ConsumerIdType = 15; + public const byte ProducerInfoType = 16; + public const byte ProducerIdType = 17; + public const byte SessionInfoType = 18; + public const byte SessionIdType = 19; + public const byte TransactionInfoType = 20; + public const byte TransactionIdType = 21; + public const byte SubscriptionInfoType = 22; + public const byte ShutdownInfoType = 23; + public const byte ResponseType = 24; + public const byte RemoveInfoType = 25; + public const byte ErrorResponseType = 26; + + public const byte DestinationType = 48; + public const byte TempDestinationType = 49; + public const byte TopicType = 50; + public const byte TempTopicType = 51; + public const byte QueueType = 52; + public const byte TempQueueType = 53; + + public static String GetDataStructureTypeAsString(int type) + { + String packetTypeStr = "UnknownType"; + switch(type) + { + case ErrorType: + packetTypeStr = "ErrorType"; + break; + case MessageType: + packetTypeStr = "MessageType"; + break; + case BytesMessageType: + packetTypeStr = "BytesMessageType"; + break; + case StreamMessageType: + packetTypeStr = "StreamMessageType"; + break; + case TextMessageType: + packetTypeStr = "TextMessageType"; + break; + case MessageDispatchType: + packetTypeStr = "MessageDispatchType"; + break; + case MessageIdType: + packetTypeStr = "MessageIdType"; + break; + case MessageAckType: + packetTypeStr = "MessageAckType"; + break; + case ConnectionInfoType: + packetTypeStr = "ConnectionInfoType"; + break; + case ConnectionIdType: + packetTypeStr = "ConnectionIdType"; + break; + case ConsumerInfoType: + packetTypeStr = "ConsumerInfoType"; + break; + case ConsumerIdType: + packetTypeStr = "ConsumerIdType"; + break; + case ProducerInfoType: + packetTypeStr = "ProducerInfoType"; + break; + case ProducerIdType: + packetTypeStr = "ProducerIdType"; + break; + case SessionInfoType: + packetTypeStr = "SessionInfoType"; + break; + case TransactionInfoType: + packetTypeStr = "TransactionInfoType"; + break; + case TransactionIdType: + packetTypeStr = "TransactionIdType"; + break; + case SubscriptionInfoType: + packetTypeStr = "SubscriptionInfoType"; + break; + case ShutdownInfoType: + packetTypeStr = "ShutdownInfoType"; + break; + case ResponseType: + packetTypeStr = "ResponseType"; + break; + case RemoveInfoType: + packetTypeStr = "RemoveInfoType"; + break; + case ErrorResponseType: + packetTypeStr = "ErrorResponseType"; + break; + case DestinationType: + packetTypeStr = "DestinationType"; + break; + case TempDestinationType: + packetTypeStr = "TempDestinationType"; + break; + case TopicType: + packetTypeStr = "TopicType"; + break; + case TempTopicType: + packetTypeStr = "TempTopicType"; + break; + case QueueType: + packetTypeStr = "QueueType"; + break; + case TempQueueType: + packetTypeStr = "TempQueueType"; + break; + } + + return packetTypeStr; + } + } +} Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/DataStructureTypes.cs ------------------------------------------------------------------------------ svn:eol-style = native Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Destination.cs Fri Dec 4 22:53:41 2009 @@ -42,27 +42,6 @@ /// Temporary Queue Destination object /// public const int STOMP_TEMPORARY_QUEUE = 4; - /// - /// prefix for Advisory message destinations - /// - public const String ADVISORY_PREFIX = "ActiveMQ.Advisory."; - /// - /// prefix for consumer advisory destinations - /// - public const String CONSUMER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Consumers."; - /// - /// prefix for producer advisory destinations - /// - public const String PRODUCER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Producers."; - /// - /// prefix for connection advisory destinations - /// - public const String CONNECTION_ADVISORY_PREFIX = ADVISORY_PREFIX + "Connections."; - - /// - /// The default target for ordered destinations - /// - public const String DEFAULT_ORDERED_TARGET = "coordinator"; private const String TEMP_PREFIX = "{TD{"; private const String TEMP_POSTFIX = "}TD}"; @@ -71,12 +50,6 @@ private String physicalName = ""; private StringDictionary options = null; - // Cached transient data - private bool exclusive; - private bool ordered; - private bool advisory; - private String orderedTarget = DEFAULT_ORDERED_TARGET; - /// /// The Default Constructor /// @@ -91,7 +64,6 @@ protected Destination(String name) { setPhysicalName(name); - //this.advisory = name != null && name.StartsWith(ADVISORY_PREFIX); } public bool IsTopic @@ -148,94 +120,6 @@ } /// - /// - /// Returns the advisory. - public bool IsAdvisory() - { - return advisory; - } - - /// - /// - /// The advisory to set. - public void SetAdvisory(bool advisory) - { - this.advisory = advisory; - } - - /// - /// - /// true if this is a destination for Consumer advisories - public bool IsConsumerAdvisory() - { - return IsAdvisory() && physicalName.StartsWith(CONSUMER_ADVISORY_PREFIX); - } - - /// - /// - /// true if this is a destination for Producer advisories - public bool IsProducerAdvisory() - { - return IsAdvisory() && physicalName.StartsWith(PRODUCER_ADVISORY_PREFIX); - } - - /// - /// - /// true if this is a destination for Connection advisories - public bool IsConnectionAdvisory() - { - return IsAdvisory() && physicalName.StartsWith(CONNECTION_ADVISORY_PREFIX); - } - - /// - /// - /// Returns the exclusive. - public bool IsExclusive() - { - return exclusive; - } - - /// - /// - /// The exclusive to set. - public void SetExclusive(bool exclusive) - { - this.exclusive = exclusive; - } - - /// - /// - /// Returns the ordered. - public bool IsOrdered() - { - return ordered; - } - - /// - /// - /// The ordered to set. - public void SetOrdered(bool ordered) - { - this.ordered = ordered; - } - - /// - /// - /// Returns the orderedTarget. - public String GetOrderedTarget() - { - return orderedTarget; - } - - /// - /// - /// The orderedTarget to set. - public void SetOrderedTarget(String orderedTarget) - { - this.orderedTarget = orderedTarget; - } - - /// /// A helper method to return a descriptive string for the topic or queue /// /// @@ -269,19 +153,19 @@ { if(destination is ITemporaryQueue) { - result = new ActiveMQTempQueue(((IQueue) destination).QueueName); + result = new TempQueue(((IQueue) destination).QueueName); } else if(destination is ITemporaryTopic) { - result = new ActiveMQTempTopic(((ITopic) destination).TopicName); + result = new TempTopic(((ITopic) destination).TopicName); } else if(destination is IQueue) { - result = new ActiveMQQueue(((IQueue) destination).QueueName); + result = new Queue(((IQueue) destination).QueueName); } else if(destination is ITopic) { - result = new ActiveMQTopic(((ITopic) destination).TopicName); + result = new Topic(((ITopic) destination).TopicName); } } } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ExceptionResponse.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class ExceptionResponse : Response { - public const byte ID_EXCEPTIONRESPONSE = 31; - BrokerError exception; /// @@ -34,7 +32,7 @@ /// public override byte GetDataStructureType() { - return ID_EXCEPTIONRESPONSE; + return DataStructureTypes.ErrorResponseType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MapMessage.cs Fri Dec 4 22:53:41 2009 @@ -25,14 +25,12 @@ { public class MapMessage : Message, IMapMessage { - public const byte ID_ACTIVEMQMAPMESSAGE = 25; - private PrimitiveMap body; private PrimitiveMapInterceptor typeConverter; public override byte GetDataStructureType() { - return ID_ACTIVEMQMAPMESSAGE; + return DataStructureTypes.MapMessageType; } public override void ClearBody() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Message.cs Fri Dec 4 22:53:41 2009 @@ -22,12 +22,10 @@ namespace Apache.NMS.Stomp.Commands { - public delegate void AcknowledgeHandler(ActiveMQMessage message); + public delegate void AcknowledgeHandler(Message message); public class Message : BaseMessage, IMessage, MarshallAware { - public const byte ID_ACTIVEMQMESSAGE = 23; - private MessagePropertyIntercepter propertyHelper; private PrimitiveMap properties; private Connection connection; @@ -44,6 +42,11 @@ Timestamp = DateUtils.ToJavaTimeUtc(DateTime.UtcNow); } + public override byte GetDataStructureType() + { + return DataStructureTypes.MessageType; + } + public override int GetHashCode() { MessageId id = this.MessageId; @@ -58,11 +61,6 @@ } } - public override byte GetDataStructureType() - { - return ID_ACTIVEMQMESSAGE; - } - public override bool Equals(object that) { if(that is Message) Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageAck.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class MessageAck : BaseCommand { - public const byte ID_MESSAGEACK = 22; - Destination destination; TransactionId transactionId; ConsumerId consumerId; @@ -40,7 +38,7 @@ /// public override byte GetDataStructureType() { - return ID_MESSAGEACK; + return DataStructureTypes.MessageAckType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageDispatch.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class MessageDispatch : BaseCommand { - public const byte ID_MESSAGEDISPATCH = 21; - ConsumerId consumerId; Destination destination; Message message; @@ -31,6 +29,17 @@ /// /// + /// Get the unique identifier that this object and its own + /// Marshaler share. + /// + /// + public override byte GetDataStructureType() + { + return DataStructureTypes.MessageDispatchType; + } + + /// + /// /// Returns a string containing the information for this DataStructure /// such as its type and value of its elements. /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/MessageId.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class MessageId : BaseDataStructure { - public const byte ID_MESSAGEID = 110; - ProducerId producerId; long producerSequenceId; long brokerSequenceId; @@ -53,7 +51,7 @@ /// public override byte GetDataStructureType() { - return ID_MESSAGEID; + return DataStructureTypes.MessageIdType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerId.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class ProducerId : BaseDataStructure { - public const byte ID_PRODUCERID = 123; - private SessionId parentId; string connectionId; @@ -60,7 +58,7 @@ /// public override byte GetDataStructureType() { - return ID_PRODUCERID; + return DataStructureTypes.ProducerIdType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ProducerInfo.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class ProducerInfo : BaseCommand { - public const byte ID_PRODUCERINFO = 6; - ProducerId producerId; Destination destination; bool dispatchAsync; @@ -37,7 +35,7 @@ /// public override byte GetDataStructureType() { - return ID_PRODUCERINFO; + return DataStructureTypes.ProducerInfoType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Queue.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Queue.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Queue.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Queue.cs Fri Dec 4 22:53:41 2009 @@ -23,8 +23,6 @@ /// public class Queue : Destination, IQueue { - public const byte ID_ACTIVEMQQUEUE = 100; - public Queue() : base() { @@ -50,7 +48,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQQUEUE; + return DataStructureTypes.QueueType; } public override int GetDestinationType() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/RemoveInfo.cs Fri Dec 4 22:53:41 2009 @@ -18,30 +18,15 @@ using System; using System.Collections; -using Apache.NMS.ActiveMQ.State; - namespace Apache.NMS.Stomp.Commands { public class RemoveInfo : BaseCommand { - public const byte ID_REMOVEINFO = 12; - DataStructure objectId; long lastDeliveredSequenceId; /// /// - /// Get the unique identifier that this object and its own - /// Marshaler share. - /// - /// - public override byte GetDataStructureType() - { - return ID_REMOVEINFO; - } - - /// - /// /// Returns a string containing the information for this DataStructure /// such as its type and value of its elements. /// @@ -54,6 +39,11 @@ "]"; } + public override byte GetDataStructureType() + { + return DataStructureTypes.RemoveInfoType; + } + public DataStructure ObjectId { get { return objectId; } Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Response.cs Fri Dec 4 22:53:41 2009 @@ -25,6 +25,11 @@ { int correlationId; + public override byte GetDataStructureType() + { + return DataStructureTypes.ResponseType; + } + /// /// /// Returns a string containing the information for this DataStructure Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionId.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class SessionId : BaseDataStructure { - public const byte ID_SESSIONID = 121; - private ConnectionId parentId; string connectionId; @@ -59,7 +57,7 @@ /// public override byte GetDataStructureType() { - return ID_SESSIONID; + return DataStructureTypes.SessionIdType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SessionInfo.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class SessionInfo : BaseCommand { - public const byte ID_SESSIONINFO = 4; - SessionId sessionId; public SessionInfo() @@ -43,7 +41,7 @@ /// public override byte GetDataStructureType() { - return ID_SESSIONINFO; + return DataStructureTypes.SessionInfoType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/ShutdownInfo.cs Fri Dec 4 22:53:41 2009 @@ -20,19 +20,8 @@ namespace Apache.NMS.Stomp.Commands { - /* - * - * Command code for OpenWire format for ShutdownInfo - * - * NOTE!: This file is auto generated - do not modify! - * if you need to make a change, please see the Java Classes - * in the nms-activemq-openwire-generator module - * - */ public class ShutdownInfo : BaseCommand { - public const byte ID_SHUTDOWNINFO = 11; - /// /// /// Get the unique identifier that this object and its own @@ -41,7 +30,7 @@ /// public override byte GetDataStructureType() { - return ID_SHUTDOWNINFO; + return DataStructureTypes.ShutdownInfoType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/StreamMessage.cs Fri Dec 4 22:53:41 2009 @@ -32,11 +32,9 @@ private MemoryStream byteBuffer = null; private int bytesRemaining = -1; - public const byte ID_ACTIVEMQSTREAMMESSAGE = 27; - public override byte GetDataStructureType() { - return ID_ACTIVEMQSTREAMMESSAGE; + return DataStructureTypes.StreamMessageType; } public bool ReadBoolean() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/SubscriptionInfo.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class SubscriptionInfo : BaseDataStructure { - public const byte ID_SUBSCRIPTIONINFO = 55; - string clientId; Destination destination; string selector; @@ -38,7 +36,7 @@ /// public override byte GetDataStructureType() { - return ID_SUBSCRIPTIONINFO; + return DataStructureTypes.SubscriptionInfoType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempDestination.cs Fri Dec 4 22:53:41 2009 @@ -28,8 +28,7 @@ /// An int public override int GetDestinationType() { - // TODO: Implement this method - return 0; + return DataStructureTypes.TempDestinationType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempQueue.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempQueue.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempQueue.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempQueue.cs Fri Dec 4 22:53:41 2009 @@ -23,8 +23,6 @@ /// public class TempQueue : TempDestination, ITemporaryQueue { - public const byte ID_ACTIVEMQTEMPQUEUE = 102; - public TempQueue() : base() { @@ -50,7 +48,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQTEMPQUEUE; + return DataStructureTypes.TempQueueType; } public override int GetDestinationType() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempTopic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempTopic.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempTopic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TempTopic.cs Fri Dec 4 22:53:41 2009 @@ -24,8 +24,6 @@ /// public class TempTopic : TempDestination, ITemporaryTopic { - public const byte ID_ACTIVEMQTEMPTOPIC = 103; - public TempTopic() : base() { @@ -52,7 +50,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQTEMPTOPIC; + return DataStructureTypes.TempTopicType; } public override int GetDestinationType() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TextMessage.cs Fri Dec 4 22:53:41 2009 @@ -26,8 +26,6 @@ { public class TextMessage : Message, ITextMessage { - public const byte ID_ACTIVEMQTEXTMESSAGE = 28; - private String text = null; public TextMessage() @@ -58,7 +56,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQTEXTMESSAGE; + return DataStructureTypes.TextMessageType; } // Properties Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Topic.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Topic.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Topic.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/Topic.cs Fri Dec 4 22:53:41 2009 @@ -24,8 +24,6 @@ /// public class StompTopic : Destination, ITopic { - public const byte ID_ACTIVEMQTOPIC = 101; - public StompTopic() : base() { } @@ -49,7 +47,7 @@ public override byte GetDataStructureType() { - return ID_ACTIVEMQTOPIC; + return DataStructureTypes.TopicType; } public override int GetDestinationType() Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionId.cs Fri Dec 4 22:53:41 2009 @@ -22,8 +22,6 @@ { public class TransactionId { - public const byte ID_TRANSACTIONID = 111; - long value; ConnectionId connectionId; @@ -35,7 +33,7 @@ /// public byte GetDataStructureType() { - return ID_LOCALTRANSACTIONID; + return DataStructureTypes.TransactionIdType; } /// Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs?rev=887420&r1=887419&r2=887420&view=diff ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs (original) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Commands/TransactionInfo.cs Fri Dec 4 22:53:41 2009 @@ -22,11 +22,9 @@ { public class TransactionInfo : BaseCommand { - public const byte ID_TRANSACTIONINFO = 7; - public const byte BEGIN = 0; - public const byte ROLLBACK = 1; - public const byte COMMIT = 2; + public const byte COMMIT = 1; + public const byte ROLLBACK = 2; ConnectionId connectionId; TransactionId transactionId; @@ -40,7 +38,7 @@ /// public override byte GetDataStructureType() { - return ID_TRANSACTIONINFO; + return DataStructureTypes.TransactionInfoType; } /// 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=887420&r1=887419&r2=887420&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 Fri Dec 4 22:53:41 2009 @@ -656,9 +656,9 @@ /// /// Creates a new local transaction ID /// - public LocalTransactionId CreateLocalTransactionId() + public TransactionId CreateLocalTransactionId() { - LocalTransactionId id = new LocalTransactionId(); + TransactionId id = new TransactionId(); id.ConnectionId = ConnectionId; id.Value = Interlocked.Increment(ref localTransactionCounter); return id; Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs?rev=887420&view=auto ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs Fri Dec 4 22:53:41 2009 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using Apache.NMS.Stomp.Commands; + +namespace Apache.NMS.Stomp +{ + /// + /// Interface that provides for a Class to provide dispatching service for + /// an OpenWire MessageDispatch command. + /// + public interface IDispatcher + { + void Dispatch(MessageDispatch messageDispatch); + } +} Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/IDispatcher.cs ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs?rev=887420&view=auto ============================================================================== --- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs (added) +++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs Fri Dec 4 22:53:41 2009 @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +namespace Apache.NMS.Stomp +{ + public interface ISynchronization + { + /// + /// Called before a commit or rollback is applied. + /// + void BeforeEnd(); + + /// + /// Called after a commit + /// + void AfterCommit(); + + /// + /// Called after a transaction rollback + /// + void AfterRollback(); + } +} + Propchange: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/ISynchronization.cs ------------------------------------------------------------------------------ svn:eol-style = native