updated the C# client to get it compiling and most of the tests working with the latest generated OpenWire code; particularly after the change of Command.CommandId from short to int

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@386440 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-03-16 19:45:13 +00:00
parent 05ea5d4795
commit f21fe895a2
28 changed files with 2235 additions and 2115 deletions

View File

@ -49,6 +49,7 @@
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTextMessage.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTextMessage.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTopic.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\ActiveMQTopic.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BaseCommand.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\BaseCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BaseDataStructure.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BooleanExpression.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\BooleanExpression.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerError.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerError.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerId.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\BrokerId.cs"/>
@ -74,6 +75,7 @@
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTrace.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTrace.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTransaction.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\JournalTransaction.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\KeepAliveInfo.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\KeepAliveInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\LastPartialCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\LocalTransactionId.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\LocalTransactionId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MarshallAware.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\MarshallAware.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\Message.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\Message.cs"/>
@ -83,6 +85,7 @@
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageId.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\MessageId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\MessageReference.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\MessageReference.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\NetworkBridgeFilter.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\NetworkBridgeFilter.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\PartialCommand.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerId.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerId.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerInfo.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\ProducerInfo.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\Commands\RemoveInfo.cs"/> <Compile Include="src\main\csharp\ActiveMQ\Commands\RemoveInfo.cs"/>
@ -149,6 +152,7 @@
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTraceMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTraceMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTransactionMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\JournalTransactionMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\KeepAliveInfoMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\KeepAliveInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\LastPartialCommandMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\LocalTransactionIdMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\LocalTransactionIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MarshallerFactory.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MarshallerFactory.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageAckMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageAckMarshaller.cs"/>
@ -157,6 +161,7 @@
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageIdMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\MessageMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\NetworkBridgeFilterMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\NetworkBridgeFilterMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\PartialCommandMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerIdMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerIdMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerInfoMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\ProducerInfoMarshaller.cs"/>
<Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\RemoveInfoMarshaller.cs"/> <Compile Include="src\main\csharp\ActiveMQ\OpenWire\V1\RemoveInfoMarshaller.cs"/>

View File

@ -20,13 +20,12 @@ using ActiveMQ.OpenWire;
namespace ActiveMQ.Commands namespace ActiveMQ.Commands
{ {
/// <summary> /// <summary>
/// Summary description for AbstractCommand. /// Summary description for AbstractCommand.
/// </summary> /// </summary>
public abstract class AbstractCommand : Command public abstract class AbstractCommand
{ {
private short commandId;
private bool responseRequired; private bool responseRequired;
@ -48,122 +47,14 @@ namespace ActiveMQ.Commands
// Properties // Properties
public short CommandId
{
get { return commandId; }
set { this.commandId = value; }
}
public bool ResponseRequired public bool ResponseRequired
{ {
get { return responseRequired; } get { return responseRequired; }
set { this.responseRequired = value; } set { this.responseRequired = value; }
} }
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;
case KeepAliveInfo.ID_KeepAliveInfo :
packetTypeStr = "KEEP_ALIVE";
break;
}
return packetTypeStr;
}
// Helper methods
public int HashCode(object value)
{
if (value != null)
{
return value.GetHashCode();
}
else
{
return -1;
}
}
public virtual void BeforeMarshall(OpenWireFormat wireFormat)
{
}
public virtual void AfterMarshall(OpenWireFormat wireFormat)
{
}
public virtual void BeforeUnmarshall(OpenWireFormat wireFormat)
{
}
public virtual void AfterUnmarshall(OpenWireFormat wireFormat)
{
}
public virtual void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data)
{
}
public virtual byte[] GetMarshalledForm(OpenWireFormat wireFormat)
{
return null;
}
} }
} }

View File

@ -1,49 +1,122 @@
// //
// Marshalling code for Open Wire Format for BaseCommand // Marshalling code for Open Wire Format for BaseCommand
// //
// //
// NOTE!: This file is autogenerated - do not modify! // NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the // if you need to make a change, please see the Groovy scripts in the
// activemq-openwire module // activemq-openwire module
// //
using ActiveMQ.Commands; using ActiveMQ.OpenWire;
using System; using System;
namespace ActiveMQ.Commands namespace ActiveMQ.Commands
{ {
public abstract class BaseCommand : AbstractCommand public abstract class BaseCommand : BaseDataStructure, Command
{ {
private int commandId;
public override int GetHashCode()
{ public int CommandId
return (CommandId * 37) + GetDataStructureType(); {
} get { return commandId; }
set { this.commandId = value; }
public override bool Equals(Object that) }
{
if (that is BaseCommand)
{ public override int GetHashCode()
BaseCommand thatCommand = (BaseCommand) that; {
return this.GetDataStructureType() == thatCommand.GetDataStructureType() return (CommandId * 37) + GetDataStructureType();
&& this.CommandId == thatCommand.CommandId; }
}
return false; public override bool Equals(Object that)
} {
if (that is BaseCommand)
public override String ToString() {
{ BaseCommand thatCommand = (BaseCommand) that;
string answer = GetDataStructureTypeAsString(GetDataStructureType()); return this.GetDataStructureType() == thatCommand.GetDataStructureType()
if (answer.Length == 0) && this.CommandId == thatCommand.CommandId;
{ }
answer = base.ToString(); return false;
} }
return answer + ": id = " + CommandId;
} public override String ToString()
{
string answer = GetDataStructureTypeAsString(GetDataStructureType());
} if (answer.Length == 0)
} {
answer = base.ToString();
}
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;
case KeepAliveInfo.ID_KeepAliveInfo :
packetTypeStr = "KEEP_ALIVE";
break;
}
return packetTypeStr;
}
}
}

View File

@ -0,0 +1,86 @@
/*
* 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.Commands;
using System;
using ActiveMQ.OpenWire;
namespace ActiveMQ.Commands
{
/// <summary>
/// Base class for all DataStructure implementations
/// </summary>
public abstract class BaseDataStructure : DataStructure
{
private bool responseRequired;
public virtual byte GetDataStructureType()
{
return 0;
}
public bool ResponseRequired
{
get { return responseRequired; }
set { this.responseRequired = value; }
}
public virtual bool IsMarshallAware()
{
return false;
}
public virtual void BeforeMarshall(OpenWireFormat wireFormat)
{
}
public virtual void AfterMarshall(OpenWireFormat wireFormat)
{
}
public virtual void BeforeUnmarshall(OpenWireFormat wireFormat)
{
}
public virtual void AfterUnmarshall(OpenWireFormat wireFormat)
{
}
public virtual void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data)
{
}
public virtual byte[] GetMarshalledForm(OpenWireFormat wireFormat)
{
return null;
}
// Helper methods
public int HashCode(object value)
{
if (value != null)
{
return value.GetHashCode();
}
else
{
return -1;
}
}
}
}

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ BrokerId Command /// </summary> public class BrokerId : AbstractCommand, DataStructure { public const byte ID_BrokerId = 124; string value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is BrokerId) { return Equals((BrokerId) that); } return false; } public virtual bool Equals(BrokerId that) { if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_BrokerId; } // Properties public string Value { get { return value; } set { this.value = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ BrokerId Command /// </summary> public class BrokerId : BaseDataStructure, DataStructure { public const byte ID_BrokerId = 124; string value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is BrokerId) { return Equals((BrokerId) that); } return false; } public virtual bool Equals(BrokerId that) { if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_BrokerId; } // Properties public string Value { get { return value; } set { this.value = value; } } } }

View File

@ -18,13 +18,13 @@ using ActiveMQ.Commands;
namespace ActiveMQ.Commands namespace ActiveMQ.Commands
{ {
/// <summary> /// <summary>
/// An OpenWire command /// An OpenWire command
/// </summary> /// </summary>
public interface Command : DataStructure public interface Command : DataStructure
{ {
short CommandId int CommandId
{ {
get; get;
set; set;

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ConnectionId Command /// </summary> public class ConnectionId : AbstractCommand, DataStructure { public const byte ID_ConnectionId = 120; string value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is ConnectionId) { return Equals((ConnectionId) that); } return false; } public virtual bool Equals(ConnectionId that) { if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_ConnectionId; } // Properties public string Value { get { return value; } set { this.value = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ConnectionId Command /// </summary> public class ConnectionId : BaseDataStructure, DataStructure { public const byte ID_ConnectionId = 120; string value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is ConnectionId) { return Equals((ConnectionId) that); } return false; } public virtual bool Equals(ConnectionId that) { if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_ConnectionId; } // Properties public string Value { get { return value; } set { this.value = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ConsumerId Command /// </summary> public class ConsumerId : AbstractCommand, DataStructure { public const byte ID_ConsumerId = 122; string connectionId; long sessionId; long value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(SessionId); answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is ConsumerId) { return Equals((ConsumerId) that); } return false; } public virtual bool Equals(ConsumerId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.SessionId, that.SessionId)) return false; if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " SessionId=" + SessionId + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_ConsumerId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long SessionId { get { return sessionId; } set { this.sessionId = value; } } public long Value { get { return value; } set { this.value = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ConsumerId Command /// </summary> public class ConsumerId : BaseDataStructure, DataStructure { public const byte ID_ConsumerId = 122; string connectionId; long sessionId; long value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(SessionId); answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is ConsumerId) { return Equals((ConsumerId) that); } return false; } public virtual bool Equals(ConsumerId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.SessionId, that.SessionId)) return false; if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " SessionId=" + SessionId + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_ConsumerId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long SessionId { get { return sessionId; } set { this.sessionId = value; } } public long Value { get { return value; } set { this.value = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ DiscoveryEvent Command /// </summary> public class DiscoveryEvent : AbstractCommand, DataStructure { public const byte ID_DiscoveryEvent = 40; string serviceName; string brokerName; public override string ToString() { return GetType().Name + "[" + " ServiceName=" + ServiceName + " BrokerName=" + BrokerName + " ]"; } public override byte GetDataStructureType() { return ID_DiscoveryEvent; } // Properties public string ServiceName { get { return serviceName; } set { this.serviceName = value; } } public string BrokerName { get { return brokerName; } set { this.brokerName = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ DiscoveryEvent Command /// </summary> public class DiscoveryEvent : BaseDataStructure, DataStructure { public const byte ID_DiscoveryEvent = 40; string serviceName; string brokerName; public override string ToString() { return GetType().Name + "[" + " ServiceName=" + ServiceName + " BrokerName=" + BrokerName + " ]"; } public override byte GetDataStructureType() { return ID_DiscoveryEvent; } // Properties public string ServiceName { get { return serviceName; } set { this.serviceName = value; } } public string BrokerName { get { return brokerName; } set { this.brokerName = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalQueueAck Command /// </summary> public class JournalQueueAck : AbstractCommand, DataStructure { public const byte ID_JournalQueueAck = 52; ActiveMQDestination destination; MessageAck messageAck; public override string ToString() { return GetType().Name + "[" + " Destination=" + Destination + " MessageAck=" + MessageAck + " ]"; } public override byte GetDataStructureType() { return ID_JournalQueueAck; } // Properties public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public MessageAck MessageAck { get { return messageAck; } set { this.messageAck = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalQueueAck Command /// </summary> public class JournalQueueAck : BaseDataStructure, DataStructure { public const byte ID_JournalQueueAck = 52; ActiveMQDestination destination; MessageAck messageAck; public override string ToString() { return GetType().Name + "[" + " Destination=" + Destination + " MessageAck=" + MessageAck + " ]"; } public override byte GetDataStructureType() { return ID_JournalQueueAck; } // Properties public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public MessageAck MessageAck { get { return messageAck; } set { this.messageAck = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTopicAck Command /// </summary> public class JournalTopicAck : AbstractCommand, DataStructure { public const byte ID_JournalTopicAck = 50; ActiveMQDestination destination; MessageId messageId; long messageSequenceId; string subscritionName; string clientId; TransactionId transactionId; public override string ToString() { return GetType().Name + "[" + " Destination=" + Destination + " MessageId=" + MessageId + " MessageSequenceId=" + MessageSequenceId + " SubscritionName=" + SubscritionName + " ClientId=" + ClientId + " TransactionId=" + TransactionId + " ]"; } public override byte GetDataStructureType() { return ID_JournalTopicAck; } // Properties public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public MessageId MessageId { get { return messageId; } set { this.messageId = value; } } public long MessageSequenceId { get { return messageSequenceId; } set { this.messageSequenceId = value; } } public string SubscritionName { get { return subscritionName; } set { this.subscritionName = value; } } public string ClientId { get { return clientId; } set { this.clientId = value; } } public TransactionId TransactionId { get { return transactionId; } set { this.transactionId = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTopicAck Command /// </summary> public class JournalTopicAck : BaseDataStructure, DataStructure { public const byte ID_JournalTopicAck = 50; ActiveMQDestination destination; MessageId messageId; long messageSequenceId; string subscritionName; string clientId; TransactionId transactionId; public override string ToString() { return GetType().Name + "[" + " Destination=" + Destination + " MessageId=" + MessageId + " MessageSequenceId=" + MessageSequenceId + " SubscritionName=" + SubscritionName + " ClientId=" + ClientId + " TransactionId=" + TransactionId + " ]"; } public override byte GetDataStructureType() { return ID_JournalTopicAck; } // Properties public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public MessageId MessageId { get { return messageId; } set { this.messageId = value; } } public long MessageSequenceId { get { return messageSequenceId; } set { this.messageSequenceId = value; } } public string SubscritionName { get { return subscritionName; } set { this.subscritionName = value; } } public string ClientId { get { return clientId; } set { this.clientId = value; } } public TransactionId TransactionId { get { return transactionId; } set { this.transactionId = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTrace Command /// </summary> public class JournalTrace : AbstractCommand, DataStructure { public const byte ID_JournalTrace = 53; string message; public override string ToString() { return GetType().Name + "[" + " Message=" + Message + " ]"; } public override byte GetDataStructureType() { return ID_JournalTrace; } // Properties public string Message { get { return message; } set { this.message = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTrace Command /// </summary> public class JournalTrace : BaseDataStructure, DataStructure { public const byte ID_JournalTrace = 53; string message; public override string ToString() { return GetType().Name + "[" + " Message=" + Message + " ]"; } public override byte GetDataStructureType() { return ID_JournalTrace; } // Properties public string Message { get { return message; } set { this.message = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTransaction Command /// </summary> public class JournalTransaction : AbstractCommand, DataStructure { public const byte ID_JournalTransaction = 54; TransactionId transactionId; byte type; bool wasPrepared; public override string ToString() { return GetType().Name + "[" + " TransactionId=" + TransactionId + " Type=" + Type + " WasPrepared=" + WasPrepared + " ]"; } public override byte GetDataStructureType() { return ID_JournalTransaction; } // Properties public TransactionId TransactionId { get { return transactionId; } set { this.transactionId = value; } } public byte Type { get { return type; } set { this.type = value; } } public bool WasPrepared { get { return wasPrepared; } set { this.wasPrepared = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ JournalTransaction Command /// </summary> public class JournalTransaction : BaseDataStructure, DataStructure { public const byte ID_JournalTransaction = 54; TransactionId transactionId; byte type; bool wasPrepared; public override string ToString() { return GetType().Name + "[" + " TransactionId=" + TransactionId + " Type=" + Type + " WasPrepared=" + WasPrepared + " ]"; } public override byte GetDataStructureType() { return ID_JournalTransaction; } // Properties public TransactionId TransactionId { get { return transactionId; } set { this.transactionId = value; } } public byte Type { get { return type; } set { this.type = value; } } public bool WasPrepared { get { return wasPrepared; } set { this.wasPrepared = value; } } } }

View File

@ -1 +1,56 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ KeepAliveInfo Command /// </summary> public class KeepAliveInfo : AbstractCommand, Command { public const byte ID_KeepAliveInfo = 10; public override string ToString() { return GetType().Name + "[" + " ]"; } public override byte GetDataStructureType() { return ID_KeepAliveInfo; } // Properties } } /*
* 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.
*/
//
// NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the
// activemq-core module
//
using System;
using System.Collections;
using ActiveMQ.OpenWire;
using ActiveMQ.Commands;
namespace ActiveMQ.Commands
{
/// <summary>
/// The ActiveMQ KeepAliveInfo Command
/// </summary>
public class KeepAliveInfo : BaseCommand, Command
{
public const byte ID_KeepAliveInfo = 10;
public override string ToString() {
return GetType().Name + "["
+ " ]";
}
public override byte GetDataStructureType() {
return ID_KeepAliveInfo;
}
// Properties
}
}

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ MessageId Command /// </summary> public class MessageId : AbstractCommand, DataStructure { public const byte ID_MessageId = 110; ProducerId producerId; long producerSequenceId; long brokerSequenceId; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ProducerId); answer = (answer * 37) + HashCode(ProducerSequenceId); answer = (answer * 37) + HashCode(BrokerSequenceId); return answer; } public override bool Equals(object that) { if (that is MessageId) { return Equals((MessageId) that); } return false; } public virtual bool Equals(MessageId that) { if (! Equals(this.ProducerId, that.ProducerId)) return false; if (! Equals(this.ProducerSequenceId, that.ProducerSequenceId)) return false; if (! Equals(this.BrokerSequenceId, that.BrokerSequenceId)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ProducerId=" + ProducerId + " ProducerSequenceId=" + ProducerSequenceId + " BrokerSequenceId=" + BrokerSequenceId + " ]"; } public override byte GetDataStructureType() { return ID_MessageId; } // Properties public ProducerId ProducerId { get { return producerId; } set { this.producerId = value; } } public long ProducerSequenceId { get { return producerSequenceId; } set { this.producerSequenceId = value; } } public long BrokerSequenceId { get { return brokerSequenceId; } set { this.brokerSequenceId = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ MessageId Command /// </summary> public class MessageId : BaseDataStructure, DataStructure { public const byte ID_MessageId = 110; ProducerId producerId; long producerSequenceId; long brokerSequenceId; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ProducerId); answer = (answer * 37) + HashCode(ProducerSequenceId); answer = (answer * 37) + HashCode(BrokerSequenceId); return answer; } public override bool Equals(object that) { if (that is MessageId) { return Equals((MessageId) that); } return false; } public virtual bool Equals(MessageId that) { if (! Equals(this.ProducerId, that.ProducerId)) return false; if (! Equals(this.ProducerSequenceId, that.ProducerSequenceId)) return false; if (! Equals(this.BrokerSequenceId, that.BrokerSequenceId)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ProducerId=" + ProducerId + " ProducerSequenceId=" + ProducerSequenceId + " BrokerSequenceId=" + BrokerSequenceId + " ]"; } public override byte GetDataStructureType() { return ID_MessageId; } // Properties public ProducerId ProducerId { get { return producerId; } set { this.producerId = value; } } public long ProducerSequenceId { get { return producerSequenceId; } set { this.producerSequenceId = value; } } public long BrokerSequenceId { get { return brokerSequenceId; } set { this.brokerSequenceId = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ NetworkBridgeFilter Command /// </summary> public class NetworkBridgeFilter : AbstractCommand, DataStructure, BooleanExpression { public const byte ID_NetworkBridgeFilter = 91; int networkTTL; BrokerId networkBrokerId; public override string ToString() { return GetType().Name + "[" + " NetworkTTL=" + NetworkTTL + " NetworkBrokerId=" + NetworkBrokerId + " ]"; } public override byte GetDataStructureType() { return ID_NetworkBridgeFilter; } // Properties public int NetworkTTL { get { return networkTTL; } set { this.networkTTL = value; } } public BrokerId NetworkBrokerId { get { return networkBrokerId; } set { this.networkBrokerId = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ NetworkBridgeFilter Command /// </summary> public class NetworkBridgeFilter : BaseDataStructure, DataStructure, BooleanExpression { public const byte ID_NetworkBridgeFilter = 91; int networkTTL; BrokerId networkBrokerId; public override string ToString() { return GetType().Name + "[" + " NetworkTTL=" + NetworkTTL + " NetworkBrokerId=" + NetworkBrokerId + " ]"; } public override byte GetDataStructureType() { return ID_NetworkBridgeFilter; } // Properties public int NetworkTTL { get { return networkTTL; } set { this.networkTTL = value; } } public BrokerId NetworkBrokerId { get { return networkBrokerId; } set { this.networkBrokerId = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ PartialCommand Command /// </summary> public class PartialCommand : AbstractCommand, Command { public const byte ID_PartialCommand = 60; int commandId; byte[] data; public override string ToString() { return GetType().Name + "[" + " CommandId=" + CommandId + " Data=" + Data + " ]"; } public override byte GetDataStructureType() { return ID_PartialCommand; } // Properties public int CommandId { get { return commandId; } set { this.commandId = value; } } public byte[] Data { get { return data; } set { this.data = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ PartialCommand Command /// </summary> public class PartialCommand : BaseDataStructure, Command { public const byte ID_PartialCommand = 60; int commandId; byte[] data; public override string ToString() { return GetType().Name + "[" + " CommandId=" + CommandId + " Data=" + Data + " ]"; } public override byte GetDataStructureType() { return ID_PartialCommand; } // Properties public int CommandId { get { return commandId; } set { this.commandId = value; } } public byte[] Data { get { return data; } set { this.data = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ProducerId Command /// </summary> public class ProducerId : AbstractCommand, DataStructure { public const byte ID_ProducerId = 123; string connectionId; long value; long sessionId; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(Value); answer = (answer * 37) + HashCode(SessionId); return answer; } public override bool Equals(object that) { if (that is ProducerId) { return Equals((ProducerId) that); } return false; } public virtual bool Equals(ProducerId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.Value, that.Value)) return false; if (! Equals(this.SessionId, that.SessionId)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " Value=" + Value + " SessionId=" + SessionId + " ]"; } public override byte GetDataStructureType() { return ID_ProducerId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long Value { get { return value; } set { this.value = value; } } public long SessionId { get { return sessionId; } set { this.sessionId = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ ProducerId Command /// </summary> public class ProducerId : BaseDataStructure, DataStructure { public const byte ID_ProducerId = 123; string connectionId; long value; long sessionId; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(Value); answer = (answer * 37) + HashCode(SessionId); return answer; } public override bool Equals(object that) { if (that is ProducerId) { return Equals((ProducerId) that); } return false; } public virtual bool Equals(ProducerId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.Value, that.Value)) return false; if (! Equals(this.SessionId, that.SessionId)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " Value=" + Value + " SessionId=" + SessionId + " ]"; } public override byte GetDataStructureType() { return ID_ProducerId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long Value { get { return value; } set { this.value = value; } } public long SessionId { get { return sessionId; } set { this.sessionId = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ SessionId Command /// </summary> public class SessionId : AbstractCommand, DataStructure { public const byte ID_SessionId = 121; string connectionId; long value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is SessionId) { return Equals((SessionId) that); } return false; } public virtual bool Equals(SessionId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_SessionId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long Value { get { return value; } set { this.value = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ SessionId Command /// </summary> public class SessionId : BaseDataStructure, DataStructure { public const byte ID_SessionId = 121; string connectionId; long value; public override int GetHashCode() { int answer = 0; answer = (answer * 37) + HashCode(ConnectionId); answer = (answer * 37) + HashCode(Value); return answer; } public override bool Equals(object that) { if (that is SessionId) { return Equals((SessionId) that); } return false; } public virtual bool Equals(SessionId that) { if (! Equals(this.ConnectionId, that.ConnectionId)) return false; if (! Equals(this.Value, that.Value)) return false; return true; } public override string ToString() { return GetType().Name + "[" + " ConnectionId=" + ConnectionId + " Value=" + Value + " ]"; } public override byte GetDataStructureType() { return ID_SessionId; } // Properties public string ConnectionId { get { return connectionId; } set { this.connectionId = value; } } public long Value { get { return value; } set { this.value = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ SubscriptionInfo Command /// </summary> public class SubscriptionInfo : AbstractCommand, DataStructure { public const byte ID_SubscriptionInfo = 55; string clientId; ActiveMQDestination destination; string selector; string subcriptionName; public override string ToString() { return GetType().Name + "[" + " ClientId=" + ClientId + " Destination=" + Destination + " Selector=" + Selector + " SubcriptionName=" + SubcriptionName + " ]"; } public override byte GetDataStructureType() { return ID_SubscriptionInfo; } // Properties public string ClientId { get { return clientId; } set { this.clientId = value; } } public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public string Selector { get { return selector; } set { this.selector = value; } } public string SubcriptionName { get { return subcriptionName; } set { this.subcriptionName = value; } } } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ SubscriptionInfo Command /// </summary> public class SubscriptionInfo : BaseDataStructure, DataStructure { public const byte ID_SubscriptionInfo = 55; string clientId; ActiveMQDestination destination; string selector; string subcriptionName; public override string ToString() { return GetType().Name + "[" + " ClientId=" + ClientId + " Destination=" + Destination + " Selector=" + Selector + " SubcriptionName=" + SubcriptionName + " ]"; } public override byte GetDataStructureType() { return ID_SubscriptionInfo; } // Properties public string ClientId { get { return clientId; } set { this.clientId = value; } } public ActiveMQDestination Destination { get { return destination; } set { this.destination = value; } } public string Selector { get { return selector; } set { this.selector = value; } } public string SubcriptionName { get { return subcriptionName; } set { this.subcriptionName = value; } } } }

View File

@ -1 +1 @@
/* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ TransactionId Command /// </summary> public class TransactionId : AbstractCommand, DataStructure { public const byte ID_TransactionId = 0; public override int GetHashCode() { int answer = 0; return answer; } public override bool Equals(object that) { if (that is TransactionId) { return Equals((TransactionId) that); } return false; } public virtual bool Equals(TransactionId that) { return true; } public override string ToString() { return GetType().Name + "[" + " ]"; } public override byte GetDataStructureType() { return ID_TransactionId; } // Properties } } /* * 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. */ // // NOTE!: This file is autogenerated - do not modify! // if you need to make a change, please see the Groovy scripts in the // activemq-core module // using System; using System.Collections; using ActiveMQ.OpenWire; using ActiveMQ.Commands; namespace ActiveMQ.Commands { /// <summary> /// The ActiveMQ TransactionId Command /// </summary> public class TransactionId : BaseDataStructure, DataStructure { public const byte ID_TransactionId = 0; public override int GetHashCode() { int answer = 0; return answer; } public override bool Equals(object that) { if (that is TransactionId) { return Equals((TransactionId) that); } return false; } public virtual bool Equals(TransactionId that) { return true; } public override string ToString() { return GetType().Name + "[" + " ]"; } public override byte GetDataStructureType() { return ID_TransactionId; } // Properties } }

View File

@ -1,134 +1,134 @@
/* /*
* Copyright 2006 The Apache Software Foundation or its licensors, as * Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable. * applicable.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
using ActiveMQ.OpenWire; using ActiveMQ.OpenWire;
using NMS; using NMS;
namespace ActiveMQ.Commands namespace ActiveMQ.Commands
{ {
// //
// Marshalling code for Open Wire Format for WireFormatInfo // Marshalling code for Open Wire Format for WireFormatInfo
// //
// //
public class WireFormatInfo : AbstractCommand, Command, MarshallAware public class WireFormatInfo : BaseCommand, Command, MarshallAware
{ {
public const byte ID_WireFormatInfo = 1; public const byte ID_WireFormatInfo = 1;
static private byte[] MAGIC = new byte[] { static private byte[] MAGIC = new byte[] {
'A'&0xFF, 'A'&0xFF,
'c'&0xFF, 'c'&0xFF,
't'&0xFF, 't'&0xFF,
'i'&0xFF, 'i'&0xFF,
'v'&0xFF, 'v'&0xFF,
'e'&0xFF, 'e'&0xFF,
'M'&0xFF, 'M'&0xFF,
'Q'&0xFF }; 'Q'&0xFF };
byte[] magic = MAGIC; byte[] magic = MAGIC;
int version; int version;
byte[] marshalledProperties; byte[] marshalledProperties;
protected static MessagePropertyHelper propertyHelper = new MessagePropertyHelper(); protected static MessagePropertyHelper propertyHelper = new MessagePropertyHelper();
private PrimitiveMap properties; private PrimitiveMap properties;
public override string ToString() { public override string ToString() {
return GetType().Name + "[" return GetType().Name + "["
+ " Magic=" + Magic + " Magic=" + Magic
+ " Version=" + Version + " Version=" + Version
+ " MarshalledProperties=" + MarshalledProperties + " MarshalledProperties=" + MarshalledProperties
+ " ]"; + " ]";
} }
public override byte GetDataStructureType() { public override byte GetDataStructureType() {
return ID_WireFormatInfo; return ID_WireFormatInfo;
} }
// Properties // Properties
public byte[] Magic public byte[] Magic
{ {
get { return magic; } get { return magic; }
set { this.magic = value; } set { this.magic = value; }
} }
public int Version public int Version
{ {
get { return version; } get { return version; }
set { this.version = value; } set { this.version = value; }
} }
public byte[] MarshalledProperties public byte[] MarshalledProperties
{ {
get { return marshalledProperties; } get { return marshalledProperties; }
set { this.marshalledProperties = value; } set { this.marshalledProperties = value; }
} }
public IPrimitiveMap Properties public IPrimitiveMap Properties
{ {
get { get {
if (properties == null) if (properties == null)
{ {
properties = PrimitiveMap.Unmarshal(MarshalledProperties); properties = PrimitiveMap.Unmarshal(MarshalledProperties);
} }
return properties; return properties;
} }
} }
public bool StackTraceEnabled public bool StackTraceEnabled
{ {
get { return true.Equals(Properties["StackTraceEnabled"]) ; } get { return true.Equals(Properties["StackTraceEnabled"]) ; }
set { Properties["StackTraceEnabled"] = value; } set { Properties["StackTraceEnabled"] = value; }
} }
public bool TcpNoDelayEnabled public bool TcpNoDelayEnabled
{ {
get { return true.Equals(Properties["TcpNoDelayEnabled"]); } get { return true.Equals(Properties["TcpNoDelayEnabled"]); }
set { Properties["TcpNoDelayEnabled"] = value; } set { Properties["TcpNoDelayEnabled"] = value; }
} }
public bool SizePrefixDisabled public bool SizePrefixDisabled
{ {
get { return true.Equals(Properties["SizePrefixDisabled"]); } get { return true.Equals(Properties["SizePrefixDisabled"]); }
set { Properties["SizePrefixDisabled"] = value; } set { Properties["SizePrefixDisabled"] = value; }
} }
public bool TightEncodingEnabled public bool TightEncodingEnabled
{ {
get { return true.Equals(Properties["TightEncodingEnabled"]); } get { return true.Equals(Properties["TightEncodingEnabled"]); }
set { Properties["TightEncodingEnabled"] = value; } set { Properties["TightEncodingEnabled"] = value; }
} }
public bool CacheEnabled public bool CacheEnabled
{ {
get { return true.Equals(Properties["CacheEnabled"]); } get { return true.Equals(Properties["CacheEnabled"]); }
set { Properties["CacheEnabled"] = value; } set { Properties["CacheEnabled"] = value; }
} }
// MarshallAware interface // MarshallAware interface
public override bool IsMarshallAware() public override bool IsMarshallAware()
{ {
return true; return true;
} }
public override void BeforeMarshall(OpenWireFormat wireFormat) public override void BeforeMarshall(OpenWireFormat wireFormat)
{ {
MarshalledProperties = null; MarshalledProperties = null;
if (properties != null) if (properties != null)
{ {
MarshalledProperties = properties.Marshal(); MarshalledProperties = properties.Marshal();
} }
} }
} }
} }

View File

@ -1,27 +1,27 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
//------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// <autogenerated> // <autogenerated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version: 1.1.4322.2032 // Mono Runtime Version: 1.1.4322.2032
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </autogenerated> // </autogenerated>
//------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
[assembly: ComVisibleAttribute(false)] [assembly: ComVisibleAttribute(false)]
[assembly: CLSCompliantAttribute(true)] [assembly: CLSCompliantAttribute(true)]
[assembly: AssemblyTitleAttribute("ActiveMQ .NET")] [assembly: AssemblyTitleAttribute("ActiveMQ .NET")]
[assembly: AssemblyDescriptionAttribute("A .NET Library for talking to ActiveMQ")] [assembly: AssemblyDescriptionAttribute("A .NET Library for talking to ActiveMQ")]
[assembly: AssemblyConfigurationAttribute("SNAPSHOT")] [assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
[assembly: AssemblyCompanyAttribute("http://activemq.org/")] [assembly: AssemblyCompanyAttribute("http://activemq.org/")]
[assembly: AssemblyProductAttribute("ActiveMQ")] [assembly: AssemblyProductAttribute("ActiveMQ")]
[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")] [assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
[assembly: AssemblyTrademarkAttribute("")] [assembly: AssemblyTrademarkAttribute("")]
[assembly: AssemblyCultureAttribute("")] [assembly: AssemblyCultureAttribute("")]
[assembly: AssemblyVersionAttribute("4.0.2259.0")] [assembly: AssemblyVersionAttribute("4.0.2266.0")]
[assembly: AssemblyInformationalVersionAttribute("4.0")] [assembly: AssemblyInformationalVersionAttribute("4.0")]

View File

@ -1,132 +1,142 @@
/* /*
* Copyright 2006 The Apache Software Foundation or its licensors, as * Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable. * applicable.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
using ActiveMQ.OpenWire; using ActiveMQ.OpenWire;
using NUnit.Framework; using NUnit.Framework;
using System; using System;
using System.IO; using System.IO;
namespace ActiveMQ.OpenWire namespace ActiveMQ.OpenWire
{ {
[TestFixture] [TestFixture]
public class EndianTest public class EndianTest
{ {
[Test] [Test]
public void TestLongEndian() public void TestLongEndian()
{ {
long value = 0x0102030405060708L; long value = 0x0102030405060708L;
long newValue = EndianSupport.SwitchEndian(value); long newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue); Console.WriteLine("New value: " + newValue);
Assert.AreEqual(0x0807060504030201L, newValue); Assert.AreEqual(0x0807060504030201L, newValue);
long actual = EndianSupport.SwitchEndian(newValue); long actual = EndianSupport.SwitchEndian(newValue);
Assert.AreEqual(value, actual); Assert.AreEqual(value, actual);
} }
[Test] [Test]
public void TestIntEndian() public void TestIntEndian()
{ {
int value = 0x12345678; int value = 0x12345678;
int newValue = EndianSupport.SwitchEndian(value); int newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue); Console.WriteLine("New value: " + newValue);
Assert.AreEqual(0x78563412, newValue); Assert.AreEqual(0x78563412, newValue);
int actual = EndianSupport.SwitchEndian(newValue); int actual = EndianSupport.SwitchEndian(newValue);
Assert.AreEqual(value, actual); Assert.AreEqual(value, actual);
} }
[Test] [Test]
public void TestShortEndian() public void TestCharEndian()
{ {
short value = 0x1234; char value = 'J';
short newValue = EndianSupport.SwitchEndian(value); char newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue); Console.WriteLine("New value: " + newValue);
Assert.AreEqual(0x3412, newValue); char actual = EndianSupport.SwitchEndian(newValue);
short actual = EndianSupport.SwitchEndian(newValue); Assert.AreEqual(value, actual);
Assert.AreEqual(value, actual); }
}
[Test]
[Test] public void TestShortEndian()
public void TestNegativeLongEndian() {
{ short value = 0x1234;
long value = -0x0102030405060708L; short newValue = EndianSupport.SwitchEndian(value);
long newValue = EndianSupport.SwitchEndian(value); Console.WriteLine("New value: " + newValue);
Console.WriteLine("New value: " + newValue); Assert.AreEqual(0x3412, newValue);
long actual = EndianSupport.SwitchEndian(newValue); short actual = EndianSupport.SwitchEndian(newValue);
Assert.AreEqual(value, actual); Assert.AreEqual(value, actual);
} }
[Test] [Test]
public void TestNegativeIntEndian() public void TestNegativeLongEndian()
{ {
int value = -0x12345678; long value = -0x0102030405060708L;
int newValue = EndianSupport.SwitchEndian(value); long newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue); Console.WriteLine("New value: " + newValue);
int actual = EndianSupport.SwitchEndian(newValue); long actual = EndianSupport.SwitchEndian(newValue);
Assert.AreEqual(value, actual); Assert.AreEqual(value, actual);
} }
[Test] [Test]
public void TestNegativeShortEndian() public void TestNegativeIntEndian()
{ {
short value = -0x1234; int value = -0x12345678;
short newValue = EndianSupport.SwitchEndian(value); int newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue); Console.WriteLine("New value: " + newValue);
short actual = EndianSupport.SwitchEndian(newValue); int actual = EndianSupport.SwitchEndian(newValue);
Assert.AreEqual(value, actual); Assert.AreEqual(value, actual);
} }
[Test] [Test]
public void TestFloatDontNeedEndianSwitch() public void TestNegativeShortEndian()
{ {
float value = -1.223F; short value = -0x1234;
Console.WriteLine("value: " + value); short newValue = EndianSupport.SwitchEndian(value);
Console.WriteLine("New value: " + newValue);
// Convert to int so we can compare to Java version. short actual = EndianSupport.SwitchEndian(newValue);
MemoryStream ms = new MemoryStream(4); Assert.AreEqual(value, actual);
BinaryWriter bw = new BinaryWriter(ms); }
bw.Write(value);
bw.Close(); [Test]
ms = new MemoryStream(ms.ToArray()); public void TestFloatDontNeedEndianSwitch()
BinaryReader br = new BinaryReader(ms); {
float value = -1.223F;
// System.out.println(Integer.toString(Float.floatToIntBits(-1.223F), 16)); Console.WriteLine("value: " + value);
Assert.AreEqual(-0x406374bc, br.ReadInt32());
// Convert to int so we can compare to Java version.
} MemoryStream ms = new MemoryStream(4);
BinaryWriter bw = new BinaryWriter(ms);
[Test] bw.Write(value);
public void TestDoublDontNeedEndianSwitch() bw.Close();
{ ms = new MemoryStream(ms.ToArray());
double value = -1.223D; BinaryReader br = new BinaryReader(ms);
Console.WriteLine("New value: " + value);
// System.out.println(Integer.toString(Float.floatToIntBits(-1.223F), 16));
// Convert to int so we can compare to Java version. Assert.AreEqual(-0x406374bc, br.ReadInt32());
MemoryStream ms = new MemoryStream(4);
BinaryWriter bw = new BinaryWriter(ms); }
bw.Write(value);
bw.Close(); [Test]
ms = new MemoryStream(ms.ToArray()); public void TestDoublDontNeedEndianSwitch()
BinaryReader br = new BinaryReader(ms); {
long longVersion = br.ReadInt64(); double value = -1.223D;
Console.WriteLine("New value: " + value);
// System.out.println(Long.toString(Double.doubleToLongBits(-1.223D), 16));
Assert.AreEqual(-0x400c6e978d4fdf3b, longVersion); // Convert to int so we can compare to Java version.
} MemoryStream ms = new MemoryStream(4);
} BinaryWriter bw = new BinaryWriter(ms);
} bw.Write(value);
bw.Close();
ms = new MemoryStream(ms.ToArray());
BinaryReader br = new BinaryReader(ms);
long longVersion = br.ReadInt64();
// System.out.println(Long.toString(Double.doubleToLongBits(-1.223D), 16));
Assert.AreEqual(-0x400c6e978d4fdf3b, longVersion);
}
}
}

View File

@ -1,27 +1,27 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
//------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
// <autogenerated> // <autogenerated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version: 1.1.4322.2032 // Mono Runtime Version: 1.1.4322.2032
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
// </autogenerated> // </autogenerated>
//------------------------------------------------------------------------------ // ------------------------------------------------------------------------------
[assembly: ComVisibleAttribute(false)] [assembly: ComVisibleAttribute(false)]
[assembly: CLSCompliantAttribute(false)] [assembly: CLSCompliantAttribute(false)]
[assembly: AssemblyTitleAttribute("ActiveMQ .NET Test")] [assembly: AssemblyTitleAttribute("ActiveMQ .NET Test")]
[assembly: AssemblyDescriptionAttribute("A .NET Library for testing the ActiveMQ .NET Library")] [assembly: AssemblyDescriptionAttribute("A .NET Library for testing the ActiveMQ .NET Library")]
[assembly: AssemblyConfigurationAttribute("SNAPSHOT")] [assembly: AssemblyConfigurationAttribute("SNAPSHOT")]
[assembly: AssemblyCompanyAttribute("http://activemq.org/")] [assembly: AssemblyCompanyAttribute("http://activemq.org/")]
[assembly: AssemblyProductAttribute("ActiveMQ")] [assembly: AssemblyProductAttribute("ActiveMQ")]
[assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")] [assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2006 Apache Software Foundation")]
[assembly: AssemblyTrademarkAttribute("")] [assembly: AssemblyTrademarkAttribute("")]
[assembly: AssemblyCultureAttribute("")] [assembly: AssemblyCultureAttribute("")]
[assembly: AssemblyVersionAttribute("4.0.2259.0")] [assembly: AssemblyVersionAttribute("4.0.2266.0")]
[assembly: AssemblyInformationalVersionAttribute("4.0")] [assembly: AssemblyInformationalVersionAttribute("4.0")]

View File

@ -1,140 +1,144 @@
/* /*
* Copyright 2006 The Apache Software Foundation or its licensors, as * Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable. * applicable.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
//using ActiveMQ; //using ActiveMQ;
using NMS; using NMS;
using NUnit.Framework; using NUnit.Framework;
using System; using System;
namespace NMS namespace NMS
{ {
[ TestFixture ] [ TestFixture ]
public class JMSPropertyTest : JMSTestSupport public class JMSPropertyTest : JMSTestSupport
{ {
// standard JMS properties // standard JMS properties
string expectedText = "Hey this works!"; string expectedText = "Hey this works!";
string correlationID = "abc"; string correlationID = "abc";
ITemporaryQueue replyTo; ITemporaryQueue replyTo;
bool persistent = true; bool persistent = true;
byte priority = 5; byte priority = 5;
String type = "FooType"; String type = "FooType";
String groupID = "MyGroup"; String groupID = "MyGroup";
int groupSeq = 1; int groupSeq = 1;
// custom properties // custom properties
string customText = "Cheese"; string customText = "Cheese";
bool custom1 = true; bool custom1 = true;
byte custom2 = 12; byte custom2 = 12;
short custom3 = 0x1234; short custom3 = 0x1234;
int custom4 = 0x12345678; int custom4 = 0x12345678;
long custom5 = 0x1234567812345678; long custom5 = 0x1234567812345678;
char custom6 = 'J'; char custom6 = 'J';
[SetUp] [SetUp]
override public void SetUp() override public void SetUp()
{ {
base.SetUp(); base.SetUp();
} }
[TearDown] [TearDown]
override public void TearDown() override public void TearDown()
{ {
base.TearDown(); base.TearDown();
} }
[ Test ] [ Test ]
public override void SendAndSyncReceive() public override void SendAndSyncReceive()
{ {
base.SendAndSyncReceive(); base.SendAndSyncReceive();
} }
protected override IMessage CreateMessage() protected override IMessage CreateMessage()
{ {
ITextMessage message = session.CreateTextMessage(expectedText); ITextMessage message = session.CreateTextMessage(expectedText);
replyTo = session.CreateTemporaryQueue(); replyTo = session.CreateTemporaryQueue();
// lets set the headers // lets set the headers
message.NMSCorrelationID = correlationID; message.NMSCorrelationID = correlationID;
message.NMSReplyTo = replyTo; message.NMSReplyTo = replyTo;
message.NMSPersistent = persistent; message.NMSPersistent = persistent;
message.NMSPriority = priority; message.NMSPriority = priority;
message.NMSType = type; message.NMSType = type;
message.Properties["JMSXGroupID"] = groupID; message.Properties["JMSXGroupID"] = groupID;
message.Properties["JMSXGroupSeq"] = groupSeq; message.Properties["JMSXGroupSeq"] = groupSeq;
// lets set the custom headers // lets set the custom headers
message.Properties["customText"] = customText; message.Properties["customText"] = customText;
message.Properties["custom1"] = custom1; message.Properties["custom1"] = custom1;
message.Properties["custom2"] = custom2; message.Properties["custom2"] = custom2;
message.Properties["custom3"] = custom3; message.Properties["custom3"] = custom3;
message.Properties["custom4"] = custom4; message.Properties["custom4"] = custom4;
message.Properties["custom5"] = custom5; message.Properties["custom5"] = custom5;
message.Properties["custom6"] = custom6; message.Properties["custom6"] = custom6;
return message; return message;
} }
protected override void AssertValidMessage(IMessage message) protected override void AssertValidMessage(IMessage message)
{ {
Assert.IsTrue(message is ITextMessage, "Did not receive a ITextMessage!"); Assert.IsTrue(message is ITextMessage, "Did not receive a ITextMessage!");
Console.WriteLine("Received Message: " + message); Console.WriteLine("Received Message: " + message);
ITextMessage textMessage = (ITextMessage) message; ITextMessage textMessage = (ITextMessage) message;
String text = textMessage.Text; String text = textMessage.Text;
Assert.AreEqual(expectedText, text, "the message text"); Assert.AreEqual(expectedText, text, "the message text");
// compare standard JMS headers // compare standard JMS headers
Assert.AreEqual(correlationID, message.NMSCorrelationID, "JMSCorrelationID"); Assert.AreEqual(correlationID, message.NMSCorrelationID, "JMSCorrelationID");
Assert.AreEqual(replyTo, message.NMSReplyTo, "JMSReplyTo"); Assert.AreEqual(replyTo, message.NMSReplyTo, "JMSReplyTo");
Assert.AreEqual(persistent, message.NMSPersistent, "JMSPersistent"); Assert.AreEqual(persistent, message.NMSPersistent, "JMSPersistent");
Assert.AreEqual(priority, message.NMSPriority, "JMSPriority"); Assert.AreEqual(priority, message.NMSPriority, "JMSPriority");
Assert.AreEqual(type, message.NMSType, "JMSType"); Assert.AreEqual(type, message.NMSType, "JMSType");
Assert.AreEqual(groupID, message.Properties["JMSXGroupID"], "JMSXGroupID"); Assert.AreEqual(groupID, message.Properties["JMSXGroupID"], "JMSXGroupID");
Assert.AreEqual(groupSeq, message.Properties["JMSXGroupSeq"], "JMSXGroupSeq"); Assert.AreEqual(groupSeq, message.Properties["JMSXGroupSeq"], "JMSXGroupSeq");
// compare custom headers // compare custom headers
Assert.AreEqual(customText, message.Properties["customText"], "customText"); Assert.AreEqual(customText, message.Properties["customText"], "customText");
Assert.AreEqual(custom1, message.Properties["custom1"], "custom1"); Assert.AreEqual(custom1, message.Properties["custom1"], "custom1");
Assert.AreEqual(custom2, message.Properties["custom2"], "custom2"); Assert.AreEqual(custom2, message.Properties["custom2"], "custom2");
Assert.AreEqual(custom3, message.Properties["custom3"], "custom3"); Assert.AreEqual(custom3, message.Properties["custom3"], "custom3");
Assert.AreEqual(custom4, message.Properties["custom4"], "custom4"); Assert.AreEqual(custom4, message.Properties["custom4"], "custom4");
// TODO // TODO
Assert.AreEqual(custom5, message.Properties["custom5"], "custom5"); Assert.AreEqual(custom5, message.Properties["custom5"], "custom5");
Assert.AreEqual(custom6, message.Properties["custom6"], "custom6"); Object value6 = message.Properties["custom6"];
Object expected6 = custom6;
Assert.AreEqual(custom1, message.Properties.GetBool("custom1"), "custom1"); Console.WriteLine("actual type is: " + value6.GetType() + " value: " + value6);
Assert.AreEqual(custom2, message.Properties.GetByte("custom2"), "custom2"); Console.WriteLine("expected type is: " + expected6.GetType() + " value: " + expected6);
Assert.AreEqual(custom3, message.Properties.GetShort("custom3"), "custom3"); Assert.AreEqual(custom6, value6, "custom6 which is of type: " + value6.GetType());
Assert.AreEqual(custom4, message.Properties.GetInt("custom4"), "custom4");
Assert.AreEqual(custom5, message.Properties.GetLong("custom5"), "custom5"); Assert.AreEqual(custom1, message.Properties.GetBool("custom1"), "custom1");
Assert.AreEqual(custom6, message.Properties.GetChar("custom6"), "custom6"); Assert.AreEqual(custom2, message.Properties.GetByte("custom2"), "custom2");
Assert.AreEqual(custom3, message.Properties.GetShort("custom3"), "custom3");
// lets now look at some standard JMS headers Assert.AreEqual(custom4, message.Properties.GetInt("custom4"), "custom4");
Console.WriteLine("JMSExpiration: " + message.NMSExpiration); Assert.AreEqual(custom5, message.Properties.GetLong("custom5"), "custom5");
Console.WriteLine("JMSMessageId: " + message.NMSMessageId); //Assert.AreEqual(custom6, message.Properties.GetChar("custom6"), "custom6");
Console.WriteLine("JMSRedelivered: " + message.NMSRedelivered);
Console.WriteLine("JMSTimestamp: " + message.NMSTimestamp); // lets now look at some standard JMS headers
Console.WriteLine("JMSXDeliveryCount: " + message.Properties["JMSXDeliveryCount"]); Console.WriteLine("JMSExpiration: " + message.NMSExpiration);
Console.WriteLine("JMSXProducerTXID: " + message.Properties["JMSXProducerTXID"]); 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"]);
}
}
}