mirror of https://github.com/apache/activemq.git
Refactored the .NET client so that all the JMS references are NMS. Figured Sun would not be happy if we called this JMS.
also tweeked the m2 poms a little git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
081b0e3b51
commit
c40f989966
|
@ -38,6 +38,12 @@
|
|||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<sourceDirectory>src/java</sourceDirectory>
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
<artifactId>xbean-spring</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -175,6 +175,12 @@
|
|||
<artifactId>xbean-spring</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -182,25 +182,25 @@
|
|||
<Compile Include="src\main\csharp\ActiveMQ\Transport\Tcp\TcpTransport.cs"/>
|
||||
<Compile Include="src\main\csharp\ActiveMQ\Transport\Tcp\TcpTransportFactory.cs"/>
|
||||
<Compile Include="src\main\csharp\ActiveMQ\Transport\TransportFilter.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IBytesMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IConnection.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IConnectionFactory.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IDestination.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IMapMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IMessageConsumer.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IMessageProducer.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IPrimitiveMap.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IQueue.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\ISession.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IStartable.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\IStoppable.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\ITemporaryQueue.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\ITemporaryTopic.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\ITextMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\ITopic.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\JMSConnectionException.cs"/>
|
||||
<Compile Include="src\main\csharp\JMS\JMSException.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IBytesMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IConnection.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IConnectionFactory.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IDestination.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IMapMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IMessageConsumer.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IMessageProducer.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IPrimitiveMap.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IQueue.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\ISession.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IStartable.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\IStoppable.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\ITemporaryQueue.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\ITemporaryTopic.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\ITextMessage.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\ITopic.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\NMSConnectionException.cs"/>
|
||||
<Compile Include="src\main\csharp\NMS\NMSException.cs"/>
|
||||
<Compile Include="src\test\csharp\ActiveMQ\Commands\CommandTest.cs"/>
|
||||
<Compile Include="src\test\csharp\ActiveMQ\OpenWire\BooleanStreamTest.cs"/>
|
||||
<Compile Include="src\test\csharp\ActiveMQ\OpenWire\EndianTest.cs"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace ActiveMQ
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace ActiveMQ
|
|||
/// <summary>
|
||||
/// Exception thrown when the broker returns an error
|
||||
/// </summary>
|
||||
public class BrokerException : JMSException
|
||||
public class BrokerException : NMSException
|
||||
{
|
||||
|
||||
private BrokerError brokerError;
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using ActiveMQ.OpenWire;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
|
||||
|
|
|
@ -1,295 +1,295 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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 ActiveMQ.OpenWire;
|
||||
using JMS;
|
||||
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
public delegate void AcknowledgeHandler(ActiveMQMessage message);
|
||||
}
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
public class ActiveMQMessage : Message, IMessage, MarshallAware
|
||||
{
|
||||
public const byte ID_ActiveMQMessage = 23;
|
||||
|
||||
protected static MessagePropertyHelper propertyHelper = new MessagePropertyHelper();
|
||||
|
||||
private PrimitiveMap properties;
|
||||
|
||||
public event AcknowledgeHandler Acknowledger;
|
||||
|
||||
public static ActiveMQMessage Transform(IMessage message)
|
||||
{
|
||||
return (ActiveMQMessage) message;
|
||||
}
|
||||
|
||||
// TODO generate Equals method
|
||||
// TODO generate GetHashCode method
|
||||
|
||||
|
||||
public override byte GetDataStructureType()
|
||||
{
|
||||
return ID_ActiveMQMessage;
|
||||
}
|
||||
|
||||
public void Acknowledge()
|
||||
{
|
||||
if (Acknowledger == null)
|
||||
{
|
||||
throw new JMSException("No Acknowledger has been associated with this message: " + this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Acknowledger(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Properties
|
||||
|
||||
public IPrimitiveMap Properties
|
||||
{
|
||||
get {
|
||||
if (properties == null)
|
||||
{
|
||||
properties = PrimitiveMap.Unmarshal(MarshalledProperties);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
||||
public IDestination FromDestination
|
||||
{
|
||||
get { return Destination; }
|
||||
set { this.Destination = ActiveMQDestination.Transform(value); }
|
||||
}
|
||||
|
||||
|
||||
// IMessage interface
|
||||
|
||||
// JMS headers
|
||||
|
||||
/// <summary>
|
||||
/// The correlation ID used to correlate messages with conversations or long running business processes
|
||||
/// </summary>
|
||||
public string JMSCorrelationID
|
||||
{
|
||||
get {
|
||||
return CorrelationId;
|
||||
}
|
||||
set {
|
||||
CorrelationId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The destination of the message
|
||||
/// </summary>
|
||||
public IDestination JMSDestination
|
||||
{
|
||||
get {
|
||||
return OriginalDestination;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The time in milliseconds that this message should expire in
|
||||
/// </summary>
|
||||
public long JMSExpiration
|
||||
{
|
||||
get {
|
||||
return Expiration;
|
||||
}
|
||||
set {
|
||||
Expiration = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The message ID which is set by the provider
|
||||
/// </summary>
|
||||
public string JMSMessageId
|
||||
{
|
||||
get {
|
||||
return BaseDataStreamMarshaller.ToString(MessageId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this message is persistent
|
||||
/// </summary>
|
||||
public bool JMSPersistent
|
||||
{
|
||||
get {
|
||||
return Persistent;
|
||||
}
|
||||
set {
|
||||
Persistent = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Priority on this message
|
||||
/// </summary>
|
||||
public byte JMSPriority
|
||||
{
|
||||
get {
|
||||
return Priority;
|
||||
}
|
||||
set {
|
||||
Priority = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully.
|
||||
/// </summary>
|
||||
public bool JMSRedelivered
|
||||
{
|
||||
get {
|
||||
return RedeliveryCounter > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The destination that the consumer of this message should send replies to
|
||||
/// </summary>
|
||||
public IDestination JMSReplyTo
|
||||
{
|
||||
get {
|
||||
return ReplyTo;
|
||||
}
|
||||
set {
|
||||
ReplyTo = ActiveMQDestination.Transform(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The timestamp the broker added to the message
|
||||
/// </summary>
|
||||
public long JMSTimestamp
|
||||
{
|
||||
get {
|
||||
return Timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type name of this message
|
||||
/// </summary>
|
||||
public string JMSType
|
||||
{
|
||||
get {
|
||||
return Type;
|
||||
}
|
||||
set {
|
||||
Type = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// JMS Extension headers
|
||||
|
||||
/// <summary>
|
||||
/// Returns the number of times this message has been redelivered to other consumers without being acknowledged successfully.
|
||||
/// </summary>
|
||||
public int JMSXDeliveryCount
|
||||
{
|
||||
get {
|
||||
return RedeliveryCounter + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Message Group ID used to group messages together to the same consumer for the same group ID value
|
||||
/// </summary>
|
||||
public string JMSXGroupID
|
||||
{
|
||||
get {
|
||||
return GroupID;
|
||||
}
|
||||
set {
|
||||
GroupID = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// The Message Group Sequence counter to indicate the position in a group
|
||||
/// </summary>
|
||||
public int JMSXGroupSeq
|
||||
{
|
||||
get {
|
||||
return GroupSequence;
|
||||
}
|
||||
set {
|
||||
GroupSequence = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID of the producers transaction
|
||||
/// </summary>
|
||||
public string JMSXProducerTXID
|
||||
{
|
||||
get {
|
||||
TransactionId txnId = OriginalTransactionId;
|
||||
if (txnId == null)
|
||||
{
|
||||
txnId = TransactionId;
|
||||
}
|
||||
if (txnId != null)
|
||||
{
|
||||
return BaseDataStreamMarshaller.ToString(txnId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public object GetObjectProperty(string name)
|
||||
{
|
||||
return propertyHelper.GetObjectProperty(this, name);
|
||||
}
|
||||
|
||||
public void SetObjectProperty(string name, object value)
|
||||
{
|
||||
propertyHelper.SetObjectProperty(this, name, value);
|
||||
}
|
||||
|
||||
// MarshallAware interface
|
||||
public override bool IsMarshallAware()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void BeforeMarshall(OpenWireFormat wireFormat)
|
||||
{
|
||||
MarshalledProperties = null;
|
||||
if (properties != null)
|
||||
{
|
||||
MarshalledProperties = properties.Marshal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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 ActiveMQ.OpenWire;
|
||||
using NMS;
|
||||
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
public delegate void AcknowledgeHandler(ActiveMQMessage message);
|
||||
}
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
public class ActiveMQMessage : Message, IMessage, MarshallAware
|
||||
{
|
||||
public const byte ID_ActiveMQMessage = 23;
|
||||
|
||||
protected static MessagePropertyHelper propertyHelper = new MessagePropertyHelper();
|
||||
|
||||
private PrimitiveMap properties;
|
||||
|
||||
public event AcknowledgeHandler Acknowledger;
|
||||
|
||||
public static ActiveMQMessage Transform(IMessage message)
|
||||
{
|
||||
return (ActiveMQMessage) message;
|
||||
}
|
||||
|
||||
// TODO generate Equals method
|
||||
// TODO generate GetHashCode method
|
||||
|
||||
|
||||
public override byte GetDataStructureType()
|
||||
{
|
||||
return ID_ActiveMQMessage;
|
||||
}
|
||||
|
||||
public void Acknowledge()
|
||||
{
|
||||
if (Acknowledger == null)
|
||||
{
|
||||
throw new NMSException("No Acknowledger has been associated with this message: " + this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Acknowledger(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Properties
|
||||
|
||||
public IPrimitiveMap Properties
|
||||
{
|
||||
get {
|
||||
if (properties == null)
|
||||
{
|
||||
properties = PrimitiveMap.Unmarshal(MarshalledProperties);
|
||||
}
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
|
||||
public IDestination FromDestination
|
||||
{
|
||||
get { return Destination; }
|
||||
set { this.Destination = ActiveMQDestination.Transform(value); }
|
||||
}
|
||||
|
||||
|
||||
// IMessage interface
|
||||
|
||||
// JMS headers
|
||||
|
||||
/// <summary>
|
||||
/// The correlation ID used to correlate messages with conversations or long running business processes
|
||||
/// </summary>
|
||||
public string NMSCorrelationID
|
||||
{
|
||||
get {
|
||||
return CorrelationId;
|
||||
}
|
||||
set {
|
||||
CorrelationId = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The destination of the message
|
||||
/// </summary>
|
||||
public IDestination NMSDestination
|
||||
{
|
||||
get {
|
||||
return OriginalDestination;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The time in milliseconds that this message should expire in
|
||||
/// </summary>
|
||||
public long NMSExpiration
|
||||
{
|
||||
get {
|
||||
return Expiration;
|
||||
}
|
||||
set {
|
||||
Expiration = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The message ID which is set by the provider
|
||||
/// </summary>
|
||||
public string NMSMessageId
|
||||
{
|
||||
get {
|
||||
return BaseDataStreamMarshaller.ToString(MessageId);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether or not this message is persistent
|
||||
/// </summary>
|
||||
public bool NMSPersistent
|
||||
{
|
||||
get {
|
||||
return Persistent;
|
||||
}
|
||||
set {
|
||||
Persistent = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Priority on this message
|
||||
/// </summary>
|
||||
public byte NMSPriority
|
||||
{
|
||||
get {
|
||||
return Priority;
|
||||
}
|
||||
set {
|
||||
Priority = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully.
|
||||
/// </summary>
|
||||
public bool NMSRedelivered
|
||||
{
|
||||
get {
|
||||
return RedeliveryCounter > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The destination that the consumer of this message should send replies to
|
||||
/// </summary>
|
||||
public IDestination NMSReplyTo
|
||||
{
|
||||
get {
|
||||
return ReplyTo;
|
||||
}
|
||||
set {
|
||||
ReplyTo = ActiveMQDestination.Transform(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The timestamp the broker added to the message
|
||||
/// </summary>
|
||||
public long NMSTimestamp
|
||||
{
|
||||
get {
|
||||
return Timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type name of this message
|
||||
/// </summary>
|
||||
public string NMSType
|
||||
{
|
||||
get {
|
||||
return Type;
|
||||
}
|
||||
set {
|
||||
Type = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// JMS Extension headers
|
||||
|
||||
/// <summary>
|
||||
/// Returns the number of times this message has been redelivered to other consumers without being acknowledged successfully.
|
||||
/// </summary>
|
||||
public int JMSXDeliveryCount
|
||||
{
|
||||
get {
|
||||
return RedeliveryCounter + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Message Group ID used to group messages together to the same consumer for the same group ID value
|
||||
/// </summary>
|
||||
public string JMSXGroupID
|
||||
{
|
||||
get {
|
||||
return GroupID;
|
||||
}
|
||||
set {
|
||||
GroupID = value;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// The Message Group Sequence counter to indicate the position in a group
|
||||
/// </summary>
|
||||
public int JMSXGroupSeq
|
||||
{
|
||||
get {
|
||||
return GroupSequence;
|
||||
}
|
||||
set {
|
||||
GroupSequence = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID of the producers transaction
|
||||
/// </summary>
|
||||
public string JMSXProducerTXID
|
||||
{
|
||||
get {
|
||||
TransactionId txnId = OriginalTransactionId;
|
||||
if (txnId == null)
|
||||
{
|
||||
txnId = TransactionId;
|
||||
}
|
||||
if (txnId != null)
|
||||
{
|
||||
return BaseDataStreamMarshaller.ToString(txnId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public object GetObjectProperty(string name)
|
||||
{
|
||||
return propertyHelper.GetObjectProperty(this, name);
|
||||
}
|
||||
|
||||
public void SetObjectProperty(string name, object value)
|
||||
{
|
||||
propertyHelper.SetObjectProperty(this, name, value);
|
||||
}
|
||||
|
||||
// MarshallAware interface
|
||||
public override bool IsMarshallAware()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void BeforeMarshall(OpenWireFormat wireFormat)
|
||||
{
|
||||
MarshalledProperties = null;
|
||||
if (properties != null)
|
||||
{
|
||||
MarshalledProperties = properties.Marshal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
|
|
|
@ -15,12 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
using ActiveMQ.OpenWire;
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace ActiveMQ.Commands
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using ActiveMQ.Commands;
|
||||
using ActiveMQ.Transport;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
@ -105,7 +105,7 @@ namespace ActiveMQ
|
|||
set {
|
||||
if (connected)
|
||||
{
|
||||
throw new JMSException("You cannot change the ClientId once the Connection is connected");
|
||||
throw new NMSException("You cannot change the ClientId once the Connection is connected");
|
||||
}
|
||||
info.ClientId = value;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ namespace ActiveMQ
|
|||
{
|
||||
ExceptionResponse exceptionResponse = (ExceptionResponse) response;
|
||||
// TODO include stack trace
|
||||
throw new JMSException("Request failed: " + exceptionResponse);
|
||||
throw new NMSException("Request failed: " + exceptionResponse);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace ActiveMQ
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown when a connection is used that it already closed
|
||||
/// </summary>
|
||||
public class ConnectionClosedException : JMSException {
|
||||
public class ConnectionClosedException : NMSException {
|
||||
public ConnectionClosedException() : base("The connection is already closed!") {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
using ActiveMQ.Commands;
|
||||
using ActiveMQ.Transport;
|
||||
using ActiveMQ.Transport.Tcp;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ
|
||||
|
|
|
@ -14,14 +14,14 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace ActiveMQ
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown when a consumer is used that it already closed
|
||||
/// </summary>
|
||||
public class ConsumerClosedException : JMSException {
|
||||
public class ConsumerClosedException : NMSException {
|
||||
public ConsumerClosedException() : base("The consumer is already closed!") {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Threading;
|
||||
|
|
|
@ -14,9 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ;
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System.Threading;
|
||||
|
||||
namespace ActiveMQ
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace ActiveMQ
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
@ -219,7 +219,7 @@ namespace ActiveMQ.OpenWire
|
|||
{
|
||||
if (! type.IsInstanceOfType(value))
|
||||
{
|
||||
throw new JMSException("Expected type: " + type.Name + " but was: " + value);
|
||||
throw new NMSException("Expected type: " + type.Name + " but was: " + value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ namespace ActiveMQ.OpenWire
|
|||
Type type = value.GetType();
|
||||
if (! type.IsPrimitive && !type.IsValueType && !type.IsAssignableFrom(typeof(string)))
|
||||
{
|
||||
throw new JMSException("Invalid type: " + type.Name + " for value: " + value);
|
||||
throw new NMSException("Invalid type: " + type.Name + " for value: " + value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using ActiveMQ.Transport;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ.Transport
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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 JMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a connection failure.
|
||||
/// </summary>
|
||||
public class ConnectionException : JMSException
|
||||
{
|
||||
public ConnectionException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright 2006 The Apache Software Foundation or its licensors, as
|
||||
* applicable.
|
||||
*
|
||||
* Licensed 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 JMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a JMS exception
|
||||
/// </summary>
|
||||
public class JMSException : Exception
|
||||
{
|
||||
public JMSException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a binary based message
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a binary based message
|
||||
/// </summary>
|
||||
public interface IBytesMessage : IMessage
|
||||
{
|
||||
|
||||
|
@ -33,3 +34,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,19 +14,23 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
namespace NMS
|
||||
{
|
||||
public enum AcknowledgementMode
|
||||
{
|
||||
Unknown, AutoAcknowledge, ClientAcknowledge, Transactional
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a connection with a message broker
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a connection with a message broker
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
public interface IConnection : IDisposable, IStartable, IStoppable
|
||||
{
|
||||
|
||||
|
@ -59,3 +63,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A Factory of IConnection objects
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// A Factory of IConnection objects
|
||||
/// </summary>
|
||||
public interface IConnectionFactory
|
||||
{
|
||||
|
||||
|
@ -37,3 +38,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,14 +14,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for Destination.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for Destination.
|
||||
/// </summary>
|
||||
public interface IDestination
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,15 +14,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Map message which contains key and value pairs which are
|
||||
/// of primitive types
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Map message which contains key and value pairs which are
|
||||
/// of primitive types
|
||||
/// </summary>
|
||||
public interface IMapMessage : IMessage
|
||||
{
|
||||
IPrimitiveMap Body
|
||||
|
@ -33,3 +34,4 @@ namespace JMS
|
|||
}
|
||||
|
||||
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a message either to be sent to a message broker or received from a message broker
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a message either to be sent to a message broker or received from a message broker
|
||||
/// </summary>
|
||||
public interface IMessage
|
||||
{
|
||||
|
||||
|
@ -42,7 +43,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The correlation ID used to correlate messages from conversations or long running business processes
|
||||
/// </summary>
|
||||
string JMSCorrelationID
|
||||
string NMSCorrelationID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -51,7 +52,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The destination of the message
|
||||
/// </summary>
|
||||
IDestination JMSDestination
|
||||
IDestination NMSDestination
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
@ -59,7 +60,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The time in milliseconds that this message should expire in
|
||||
/// </summary>
|
||||
long JMSExpiration
|
||||
long NMSExpiration
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -68,7 +69,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The message ID which is set by the provider
|
||||
/// </summary>
|
||||
string JMSMessageId
|
||||
string NMSMessageId
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
@ -76,7 +77,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// Whether or not this message is persistent
|
||||
/// </summary>
|
||||
bool JMSPersistent
|
||||
bool NMSPersistent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -85,7 +86,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The Priority on this message
|
||||
/// </summary>
|
||||
byte JMSPriority
|
||||
byte NMSPriority
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -94,7 +95,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully.
|
||||
/// </summary>
|
||||
bool JMSRedelivered
|
||||
bool NMSRedelivered
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
@ -103,7 +104,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The destination that the consumer of this message should send replies to
|
||||
/// </summary>
|
||||
IDestination JMSReplyTo
|
||||
IDestination NMSReplyTo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
|
@ -113,7 +114,7 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The timestamp the broker added to the message
|
||||
/// </summary>
|
||||
long JMSTimestamp
|
||||
long NMSTimestamp
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
@ -121,49 +122,13 @@ namespace JMS
|
|||
/// <summary>
|
||||
/// The type name of this message
|
||||
/// </summary>
|
||||
string JMSType
|
||||
string NMSType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
|
||||
// JMS Extension headers
|
||||
|
||||
/// <summary>
|
||||
/// Returns the number of times this message has been redelivered to other consumers without being acknowledged successfully.
|
||||
/// </summary>
|
||||
int JMSXDeliveryCount
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Message Group ID used to group messages together to the same consumer for the same group ID value
|
||||
/// </summary>
|
||||
string JMSXGroupID
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
/// <summary>
|
||||
/// The Message Group Sequence counter to indicate the position in a group
|
||||
/// </summary>
|
||||
int JMSXGroupSeq
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID of the producers transaction
|
||||
/// </summary>
|
||||
string JMSXProducerTXID
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,16 +14,20 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
namespace NMS
|
||||
{
|
||||
public delegate void MessageListener(IMessage message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A consumer of messages
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// A consumer of messages
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
public interface IMessageConsumer : IDisposable
|
||||
{
|
||||
|
||||
|
@ -49,3 +53,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,15 +14,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// An object capable of sending messages to some destination
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// An object capable of sending messages to some destination
|
||||
/// </summary>
|
||||
public interface IMessageProducer : IDisposable
|
||||
{
|
||||
|
||||
|
@ -69,3 +70,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -16,13 +16,14 @@
|
|||
*/
|
||||
using System.Collections;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Map of primitive types where the keys are all string instances
|
||||
/// and the values are strings or numbers.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a Map of primitive types where the keys are all string instances
|
||||
/// and the values are strings or numbers.
|
||||
/// </summary>
|
||||
public interface IPrimitiveMap
|
||||
{
|
||||
|
||||
|
@ -83,3 +84,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,15 +14,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for IQueue.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for IQueue.
|
||||
/// </summary>
|
||||
public interface IQueue : IDestination
|
||||
{
|
||||
|
||||
|
@ -33,3 +34,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,16 +14,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single unit of work on an IConnection.
|
||||
/// So the ISession can be used to perform transactional receive and sends
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <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 : IDisposable
|
||||
{
|
||||
|
||||
|
@ -124,3 +125,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -15,7 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
namespace JMS
|
||||
|
||||
namespace NMS
|
||||
{
|
||||
public interface IStartable
|
||||
{
|
||||
|
@ -23,3 +24,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,10 +14,12 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
namespace JMS
|
||||
|
||||
namespace NMS
|
||||
{
|
||||
public interface IStoppable
|
||||
{
|
||||
void Stop();
|
||||
}
|
||||
}
|
||||
|
|
@ -14,16 +14,18 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for ITemporaryQueue.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for ITemporaryQueue.
|
||||
/// </summary>
|
||||
public interface ITemporaryQueue : IDestination
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,16 +14,18 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for TemporaryTopic.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for TemporaryTopic.
|
||||
/// </summary>
|
||||
public interface ITemporaryTopic : IDestination
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Represents a text based message
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Represents a text based message
|
||||
/// </summary>
|
||||
public interface ITextMessage : IMessage
|
||||
{
|
||||
|
||||
|
@ -33,3 +34,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,15 +14,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace JMS
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for ITopic.
|
||||
/// </summary>
|
||||
namespace NMS
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Summary description for ITopic.
|
||||
/// </summary>
|
||||
public interface ITopic : IDestination
|
||||
{
|
||||
|
||||
|
@ -33,3 +34,4 @@ namespace JMS
|
|||
}
|
||||
}
|
||||
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using ActiveMQ.Commands;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using System;
|
||||
|
||||
namespace ActiveMQ
|
||||
|
@ -47,8 +47,8 @@ namespace ActiveMQ
|
|||
|
||||
// lets send a message
|
||||
ITextMessage request = session.CreateTextMessage("Hello World!");
|
||||
request.JMSCorrelationID = "abc";
|
||||
request.JMSXGroupID = "cheese";
|
||||
request.NMSCorrelationID = "abc";
|
||||
request.Properties["JMSXGroupID"] = "cheese";
|
||||
request.Properties["myHeader"] = "James";
|
||||
|
||||
producer.Send(request);
|
||||
|
@ -61,7 +61,7 @@ namespace ActiveMQ
|
|||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Received message with ID: " + message.JMSMessageId);
|
||||
Console.WriteLine("Received message with ID: " + message.NMSMessageId);
|
||||
Console.WriteLine("Received message with text: " + message.Text);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Threading;
|
||||
|
@ -53,8 +53,8 @@ namespace JMS
|
|||
// now lets send a message
|
||||
IMessageProducer producer = CreateProducer();
|
||||
IMessage request = CreateMessage();
|
||||
request.JMSCorrelationID = "abc";
|
||||
request.JMSType = "Test";
|
||||
request.NMSCorrelationID = "abc";
|
||||
request.NMSType = "Test";
|
||||
producer.Send(request);
|
||||
|
||||
WaitForMessageToArrive();
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
//using ActiveMQ;
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
@ -68,13 +68,13 @@ namespace JMS
|
|||
replyTo = session.CreateTemporaryQueue();
|
||||
|
||||
// lets set the headers
|
||||
message.JMSCorrelationID = correlationID;
|
||||
message.JMSReplyTo = replyTo;
|
||||
message.JMSPersistent = persistent;
|
||||
message.JMSPriority = priority;
|
||||
message.JMSType = type;
|
||||
message.JMSXGroupID = groupID;
|
||||
message.JMSXGroupSeq = groupSeq;
|
||||
message.NMSCorrelationID = correlationID;
|
||||
message.NMSReplyTo = replyTo;
|
||||
message.NMSPersistent = persistent;
|
||||
message.NMSPriority = priority;
|
||||
message.NMSType = type;
|
||||
message.Properties["JMSXGroupID"] = groupID;
|
||||
message.Properties["JMSXGroupSeq"] = groupSeq;
|
||||
|
||||
// lets set the custom headers
|
||||
message.Properties["customText"] = customText;
|
||||
|
@ -99,13 +99,13 @@ namespace JMS
|
|||
Assert.AreEqual(expectedText, text, "the message text");
|
||||
|
||||
// compare standard JMS headers
|
||||
Assert.AreEqual(correlationID, message.JMSCorrelationID, "JMSCorrelationID");
|
||||
Assert.AreEqual(replyTo, message.JMSReplyTo, "JMSReplyTo");
|
||||
Assert.AreEqual(persistent, message.JMSPersistent, "JMSPersistent");
|
||||
Assert.AreEqual(priority, message.JMSPriority, "JMSPriority");
|
||||
Assert.AreEqual(type, message.JMSType, "JMSType");
|
||||
Assert.AreEqual(groupID, message.JMSXGroupID, "JMSXGroupID");
|
||||
Assert.AreEqual(groupSeq, message.JMSXGroupSeq, "JMSXGroupSeq");
|
||||
Assert.AreEqual(correlationID, message.NMSCorrelationID, "JMSCorrelationID");
|
||||
Assert.AreEqual(replyTo, message.NMSReplyTo, "JMSReplyTo");
|
||||
Assert.AreEqual(persistent, message.NMSPersistent, "JMSPersistent");
|
||||
Assert.AreEqual(priority, message.NMSPriority, "JMSPriority");
|
||||
Assert.AreEqual(type, message.NMSType, "JMSType");
|
||||
Assert.AreEqual(groupID, message.Properties["JMSXGroupID"], "JMSXGroupID");
|
||||
Assert.AreEqual(groupSeq, message.Properties["JMSXGroupSeq"], "JMSXGroupSeq");
|
||||
|
||||
// compare custom headers
|
||||
Assert.AreEqual(customText, message.Properties["customText"], "customText");
|
||||
|
@ -125,12 +125,12 @@ namespace JMS
|
|||
Assert.AreEqual(custom6, message.Properties.GetChar("custom6"), "custom6");
|
||||
|
||||
// lets now look at some standard JMS headers
|
||||
Console.WriteLine("JMSExpiration: " + message.JMSExpiration);
|
||||
Console.WriteLine("JMSMessageId: " + message.JMSMessageId);
|
||||
Console.WriteLine("JMSRedelivered: " + message.JMSRedelivered);
|
||||
Console.WriteLine("JMSTimestamp: " + message.JMSTimestamp);
|
||||
Console.WriteLine("JMSXDeliveryCount: " + message.JMSXDeliveryCount);
|
||||
Console.WriteLine("JMSXProducerTXID: " + message.JMSXProducerTXID);
|
||||
Console.WriteLine("JMSExpiration: " + message.NMSExpiration);
|
||||
Console.WriteLine("JMSMessageId: " + message.NMSMessageId);
|
||||
Console.WriteLine("JMSRedelivered: " + message.NMSRedelivered);
|
||||
Console.WriteLine("JMSTimestamp: " + message.NMSTimestamp);
|
||||
Console.WriteLine("JMSXDeliveryCount: " + message.Properties["JMSXDeliveryCount"]);
|
||||
Console.WriteLine("JMSXProducerTXID: " + message.Properties["JMSXProducerTXID"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
using JMS;
|
||||
using NMS;
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
|
|
@ -141,6 +141,12 @@
|
|||
<version>0.9.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -97,6 +97,12 @@
|
|||
<groupId>commons-httpclient</groupId>
|
||||
<artifactId>commons-httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -46,6 +46,28 @@
|
|||
<groupId>activemq</groupId>
|
||||
<artifactId>jmdns</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jmock</groupId>
|
||||
<artifactId>jmock</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jmock</groupId>
|
||||
<artifactId>jmock-cglib</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-full</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -84,6 +84,12 @@
|
|||
<artifactId>ant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -54,6 +54,13 @@
|
|||
<groupId>jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
|
@ -104,6 +104,12 @@
|
|||
<groupId>jetty</groupId>
|
||||
<artifactId>jetty</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
|
|
@ -395,6 +395,12 @@
|
|||
<artifactId>manta</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
|
10
pom.xml
10
pom.xml
|
@ -42,16 +42,16 @@
|
|||
<enabled>false</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-csharp</id>
|
||||
<name>maven-csharp</name>
|
||||
<url>http://maven-csharp.javaforge.com/repo</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>codehaus-snapshot</id>
|
||||
<name>CodeHaus Snapshot Repo</name>
|
||||
<url>http://snapshots.maven.codehaus.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>maven-csharp</id>
|
||||
<name>maven-csharp</name>
|
||||
<url>http://maven-csharp.javaforge.com/repo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
|
|
Loading…
Reference in New Issue