diff --git a/openwire-dotnet/OpenWire.build b/openwire-dotnet/OpenWire.build index 0d71f86325..af528c7642 100644 --- a/openwire-dotnet/OpenWire.build +++ b/openwire-dotnet/OpenWire.build @@ -105,7 +105,7 @@ - + @@ -148,8 +148,8 @@ - - + + @@ -162,8 +162,8 @@ - - + + diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs new file mode 100644 index 0000000000..e18d604130 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQBytesMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQBytesMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQBytesMessage : ActiveMQMessage + { + public const byte ID_ActiveMQBytesMessage = 24; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQBytesMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs new file mode 100644 index 0000000000..bab543f572 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMapMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQMapMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQMapMessage : ActiveMQMessage + { + public const byte ID_ActiveMQMapMessage = 25; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQMapMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs new file mode 100644 index 0000000000..d5296bc1b7 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQMessage : Message + { + public const byte ID_ActiveMQMessage = 23; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs new file mode 100644 index 0000000000..525eb37499 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQObjectMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQObjectMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQObjectMessage : ActiveMQMessage + { + public const byte ID_ActiveMQObjectMessage = 26; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQObjectMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs new file mode 100644 index 0000000000..a190231f37 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQStreamMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQStreamMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQStreamMessage : ActiveMQMessage + { + public const byte ID_ActiveMQStreamMessage = 27; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQStreamMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs new file mode 100644 index 0000000000..df71ce1402 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ActiveMQTextMessage.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTextMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ActiveMQTextMessage : ActiveMQMessage + { + public const byte ID_ActiveMQTextMessage = 28; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ActiveMQTextMessage; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs new file mode 100644 index 0000000000..b78720bc96 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BaseCommand.cs @@ -0,0 +1,63 @@ +// +// Marshalling code for Open Wire Format for BaseCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands { + + public class BaseCommand : AbstractCommand { + public const byte ID_BaseCommand = 0; + + short commandId; + bool responseRequired; + + + public override int GetHashCode() { + return commandId; + } + + public override bool Equals(Object that) { + if (that is BaseCommand) { + BaseCommand thatCommand = (BaseCommand) that; + return this.GetCommandType() == thatCommand.GetCommandType() + && this.CommandId == thatCommand.CommandId; + } + return false; + } + + public override String ToString() { + string answer = GetCommandTypeAsString(GetCommandType()); + if (answer.Length == 0) { + answer = base.ToString(); + } + return answer + ": id = " + CommandId; + } + + public override byte GetCommandType() { + return ID_BaseCommand; + } + + + // Properties + + public short CommandId { + get { return commandId; } + set { this.commandId = value; } + } + + public bool ResponseRequired { + get { return responseRequired; } + set { this.responseRequired = value; } + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs new file mode 100644 index 0000000000..6ac1079d1d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerId.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for BrokerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class BrokerId : AbstractCommand + { + public const byte ID_BrokerId = 124; + + string value; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_BrokerId; + } + + + // Properties + + public string Value + { + get { return value; } + set { this.value = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs new file mode 100644 index 0000000000..2663100538 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/BrokerInfo.cs @@ -0,0 +1,66 @@ +// +// Marshalling code for Open Wire Format for BrokerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class BrokerInfo : BaseCommand + { + public const byte ID_BrokerInfo = 2; + + BrokerId brokerId; + string brokerURL; + BrokerInfo[] peerBrokerInfos; + string brokerName; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_BrokerInfo; + } + + + // Properties + + public BrokerId BrokerId + { + get { return brokerId; } + set { this.brokerId = value; } + } + + public string BrokerURL + { + get { return brokerURL; } + set { this.brokerURL = value; } + } + + public BrokerInfo[] PeerBrokerInfos + { + get { return peerBrokerInfos; } + set { this.peerBrokerInfos = value; } + } + + public string BrokerName + { + get { return brokerName; } + set { this.brokerName = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs new file mode 100644 index 0000000000..c2ae7b9654 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionError.cs @@ -0,0 +1,52 @@ +// +// Marshalling code for Open Wire Format for ConnectionError +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ConnectionError : BaseCommand + { + public const byte ID_ConnectionError = 16; + + byte[] exception; + ConnectionId connectionId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ConnectionError; + } + + + // Properties + + public byte[] Exception + { + get { return exception; } + set { this.exception = value; } + } + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs new file mode 100644 index 0000000000..76ee8bd4c3 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionId.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ConnectionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ConnectionId : AbstractCommand + { + public const byte ID_ConnectionId = 120; + + string value; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ConnectionId; + } + + + // Properties + + public string Value + { + get { return value; } + set { this.value = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs new file mode 100644 index 0000000000..572e31edae --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConnectionInfo.cs @@ -0,0 +1,73 @@ +// +// Marshalling code for Open Wire Format for ConnectionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ConnectionInfo : BaseCommand + { + public const byte ID_ConnectionInfo = 3; + + ConnectionId connectionId; + string clientId; + string password; + string userName; + BrokerId[] brokerPath; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ConnectionInfo; + } + + + // Properties + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + public string ClientId + { + get { return clientId; } + set { this.clientId = value; } + } + + public string Password + { + get { return password; } + set { this.password = value; } + } + + public string UserName + { + get { return userName; } + set { this.userName = value; } + } + + public BrokerId[] BrokerPath + { + get { return brokerPath; } + set { this.brokerPath = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs new file mode 100644 index 0000000000..968d6b681a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerId.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for ConsumerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ConsumerId : AbstractCommand + { + public const byte ID_ConsumerId = 122; + + string connectionId; + long sessionId; + long value; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs new file mode 100644 index 0000000000..9728eebc0c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ConsumerInfo.cs @@ -0,0 +1,129 @@ +// +// Marshalling code for Open Wire Format for ConsumerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ConsumerInfo : BaseCommand + { + public const byte ID_ConsumerInfo = 5; + + ConsumerId consumerId; + bool browser; + ActiveMQDestination destination; + int prefetchSize; + bool dispatchAsync; + string selector; + string subcriptionName; + bool noLocal; + bool exclusive; + bool retroactive; + byte priority; + BrokerId[] brokerPath; + bool networkSubscription; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ConsumerInfo; + } + + + // Properties + + public ConsumerId ConsumerId + { + get { return consumerId; } + set { this.consumerId = value; } + } + + public bool Browser + { + get { return browser; } + set { this.browser = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public int PrefetchSize + { + get { return prefetchSize; } + set { this.prefetchSize = value; } + } + + public bool DispatchAsync + { + get { return dispatchAsync; } + set { this.dispatchAsync = value; } + } + + public string Selector + { + get { return selector; } + set { this.selector = value; } + } + + public string SubcriptionName + { + get { return subcriptionName; } + set { this.subcriptionName = value; } + } + + public bool NoLocal + { + get { return noLocal; } + set { this.noLocal = value; } + } + + public bool Exclusive + { + get { return exclusive; } + set { this.exclusive = value; } + } + + public bool Retroactive + { + get { return retroactive; } + set { this.retroactive = value; } + } + + public byte Priority + { + get { return priority; } + set { this.priority = value; } + } + + public BrokerId[] BrokerPath + { + get { return brokerPath; } + set { this.brokerPath = value; } + } + + public bool NetworkSubscription + { + get { return networkSubscription; } + set { this.networkSubscription = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs new file mode 100644 index 0000000000..965bc68fb3 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ControlCommand.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ControlCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ControlCommand : BaseCommand + { + public const byte ID_ControlCommand = 14; + + string command; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ControlCommand; + } + + + // Properties + + public string Command + { + get { return command; } + set { this.command = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs new file mode 100644 index 0000000000..d7e73ca183 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DataArrayResponse.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for DataArrayResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class DataArrayResponse : Response + { + public const byte ID_DataArrayResponse = 33; + + DataStructure[] data; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_DataArrayResponse; + } + + + // Properties + + public DataStructure[] Data + { + get { return data; } + set { this.data = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs new file mode 100644 index 0000000000..a14e334b0f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DataResponse.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for DataResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class DataResponse : Response + { + public const byte ID_DataResponse = 32; + + DataStructure data; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_DataResponse; + } + + + // Properties + + public DataStructure Data + { + get { return data; } + set { this.data = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs new file mode 100644 index 0000000000..1a060666e6 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DestinationInfo.cs @@ -0,0 +1,73 @@ +// +// Marshalling code for Open Wire Format for DestinationInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class DestinationInfo : BaseCommand + { + public const byte ID_DestinationInfo = 8; + + ConnectionId connectionId; + ActiveMQDestination destination; + byte operationType; + long timeout; + BrokerId[] brokerPath; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_DestinationInfo; + } + + + // Properties + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public byte OperationType + { + get { return operationType; } + set { this.operationType = value; } + } + + public long Timeout + { + get { return timeout; } + set { this.timeout = value; } + } + + public BrokerId[] BrokerPath + { + get { return brokerPath; } + set { this.brokerPath = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs b/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs new file mode 100644 index 0000000000..94e4722697 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/DiscoveryEvent.cs @@ -0,0 +1,52 @@ +// +// Marshalling code for Open Wire Format for DiscoveryEvent +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class DiscoveryEvent : AbstractCommand + { + public const byte ID_DiscoveryEvent = 40; + + string serviceName; + string brokerName; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_DiscoveryEvent; + } + + + // Properties + + public string ServiceName + { + get { return serviceName; } + set { this.serviceName = value; } + } + + public string BrokerName + { + get { return brokerName; } + set { this.brokerName = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs new file mode 100644 index 0000000000..717c829198 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ExceptionResponse.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ExceptionResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ExceptionResponse : Response + { + public const byte ID_ExceptionResponse = 31; + + byte[] exception; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ExceptionResponse; + } + + + // Properties + + public byte[] Exception + { + get { return exception; } + set { this.exception = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs b/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs new file mode 100644 index 0000000000..caf832bb83 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/FlushCommand.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for FlushCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class FlushCommand : BaseCommand + { + public const byte ID_FlushCommand = 15; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_FlushCommand; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs b/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs new file mode 100644 index 0000000000..217e0cc563 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/IntegerResponse.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for IntegerResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class IntegerResponse : Response + { + public const byte ID_IntegerResponse = 34; + + int result; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_IntegerResponse; + } + + + // Properties + + public int Result + { + get { return result; } + set { this.result = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs new file mode 100644 index 0000000000..1b37ea41ff --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalQueueAck.cs @@ -0,0 +1,52 @@ +// +// Marshalling code for Open Wire Format for JournalQueueAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class JournalQueueAck : AbstractCommand + { + public const byte ID_JournalQueueAck = 52; + + ActiveMQDestination destination; + MessageAck messageAck; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_JournalQueueAck; + } + + + // Properties + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public MessageAck MessageAck + { + get { return messageAck; } + set { this.messageAck = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs new file mode 100644 index 0000000000..38f78b9391 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTopicAck.cs @@ -0,0 +1,80 @@ +// +// Marshalling code for Open Wire Format for JournalTopicAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class JournalTopicAck : AbstractCommand + { + public const byte ID_JournalTopicAck = 50; + + ActiveMQDestination destination; + MessageId messageId; + long messageSequenceId; + string subscritionName; + string clientId; + TransactionId transactionId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs new file mode 100644 index 0000000000..b78edd5544 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTrace.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for JournalTrace +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class JournalTrace : AbstractCommand + { + public const byte ID_JournalTrace = 53; + + string message; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_JournalTrace; + } + + + // Properties + + public string Message + { + get { return message; } + set { this.message = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs new file mode 100644 index 0000000000..44c257a11a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/JournalTransaction.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for JournalTransaction +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class JournalTransaction : AbstractCommand + { + public const byte ID_JournalTransaction = 54; + + TransactionId transactionId; + byte type; + bool wasPrepared; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs new file mode 100644 index 0000000000..77d00d772b --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/KeepAliveInfo.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for KeepAliveInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class KeepAliveInfo : AbstractCommand + { + public const byte ID_KeepAliveInfo = 10; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_KeepAliveInfo; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs new file mode 100644 index 0000000000..e8f835c961 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/LocalTransactionId.cs @@ -0,0 +1,52 @@ +// +// Marshalling code for Open Wire Format for LocalTransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class LocalTransactionId : TransactionId + { + public const byte ID_LocalTransactionId = 111; + + long value; + ConnectionId connectionId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_LocalTransactionId; + } + + + // Properties + + public long Value + { + get { return value; } + set { this.value = value; } + } + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs b/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs new file mode 100644 index 0000000000..b4fb5fd544 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/Message.cs @@ -0,0 +1,213 @@ +// +// Marshalling code for Open Wire Format for Message +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class Message : BaseCommand + { + public const byte ID_Message = 0; + + ProducerId producerId; + ActiveMQDestination destination; + TransactionId transactionId; + ActiveMQDestination originalDestination; + MessageId messageId; + TransactionId originalTransactionId; + string groupID; + int groupSequence; + string correlationId; + bool persistent; + long expiration; + byte priority; + ActiveMQDestination replyTo; + long timestamp; + string type; + byte[] content; + byte[] marshalledProperties; + DataStructure dataStructure; + ConsumerId targetConsumerId; + bool compressed; + int redeliveryCounter; + BrokerId[] brokerPath; + long arrival; + string userID; + bool recievedByDFBridge; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_Message; + } + + + // Properties + + public ProducerId ProducerId + { + get { return producerId; } + set { this.producerId = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public TransactionId TransactionId + { + get { return transactionId; } + set { this.transactionId = value; } + } + + public ActiveMQDestination OriginalDestination + { + get { return originalDestination; } + set { this.originalDestination = value; } + } + + public MessageId MessageId + { + get { return messageId; } + set { this.messageId = value; } + } + + public TransactionId OriginalTransactionId + { + get { return originalTransactionId; } + set { this.originalTransactionId = value; } + } + + public string GroupID + { + get { return groupID; } + set { this.groupID = value; } + } + + public int GroupSequence + { + get { return groupSequence; } + set { this.groupSequence = value; } + } + + public string CorrelationId + { + get { return correlationId; } + set { this.correlationId = value; } + } + + public bool Persistent + { + get { return persistent; } + set { this.persistent = value; } + } + + public long Expiration + { + get { return expiration; } + set { this.expiration = value; } + } + + public byte Priority + { + get { return priority; } + set { this.priority = value; } + } + + public ActiveMQDestination ReplyTo + { + get { return replyTo; } + set { this.replyTo = value; } + } + + public long Timestamp + { + get { return timestamp; } + set { this.timestamp = value; } + } + + public string Type + { + get { return type; } + set { this.type = value; } + } + + public byte[] Content + { + get { return content; } + set { this.content = value; } + } + + public byte[] MarshalledProperties + { + get { return marshalledProperties; } + set { this.marshalledProperties = value; } + } + + public DataStructure DataStructure + { + get { return dataStructure; } + set { this.dataStructure = value; } + } + + public ConsumerId TargetConsumerId + { + get { return targetConsumerId; } + set { this.targetConsumerId = value; } + } + + public bool Compressed + { + get { return compressed; } + set { this.compressed = value; } + } + + public int RedeliveryCounter + { + get { return redeliveryCounter; } + set { this.redeliveryCounter = value; } + } + + public BrokerId[] BrokerPath + { + get { return brokerPath; } + set { this.brokerPath = value; } + } + + public long Arrival + { + get { return arrival; } + set { this.arrival = value; } + } + + public string UserID + { + get { return userID; } + set { this.userID = value; } + } + + public bool RecievedByDFBridge + { + get { return recievedByDFBridge; } + set { this.recievedByDFBridge = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs new file mode 100644 index 0000000000..8b97533c84 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageAck.cs @@ -0,0 +1,87 @@ +// +// Marshalling code for Open Wire Format for MessageAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class MessageAck : BaseCommand + { + public const byte ID_MessageAck = 22; + + ActiveMQDestination destination; + TransactionId transactionId; + ConsumerId consumerId; + byte ackType; + MessageId firstMessageId; + MessageId lastMessageId; + int messageCount; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_MessageAck; + } + + + // Properties + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public TransactionId TransactionId + { + get { return transactionId; } + set { this.transactionId = value; } + } + + public ConsumerId ConsumerId + { + get { return consumerId; } + set { this.consumerId = value; } + } + + public byte AckType + { + get { return ackType; } + set { this.ackType = value; } + } + + public MessageId FirstMessageId + { + get { return firstMessageId; } + set { this.firstMessageId = value; } + } + + public MessageId LastMessageId + { + get { return lastMessageId; } + set { this.lastMessageId = value; } + } + + public int MessageCount + { + get { return messageCount; } + set { this.messageCount = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs new file mode 100644 index 0000000000..584d95e8eb --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageDispatch.cs @@ -0,0 +1,66 @@ +// +// Marshalling code for Open Wire Format for MessageDispatch +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class MessageDispatch : BaseCommand + { + public const byte ID_MessageDispatch = 21; + + ConsumerId consumerId; + ActiveMQDestination destination; + Message message; + int redeliveryCounter; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_MessageDispatch; + } + + + // Properties + + public ConsumerId ConsumerId + { + get { return consumerId; } + set { this.consumerId = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public Message Message + { + get { return message; } + set { this.message = value; } + } + + public int RedeliveryCounter + { + get { return redeliveryCounter; } + set { this.redeliveryCounter = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs new file mode 100644 index 0000000000..037b082d59 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/MessageId.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for MessageId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class MessageId : AbstractCommand + { + public const byte ID_MessageId = 110; + + ProducerId producerId; + long producerSequenceId; + long brokerSequenceId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs new file mode 100644 index 0000000000..283a097afa --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerId.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for ProducerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ProducerId : AbstractCommand + { + public const byte ID_ProducerId = 123; + + string connectionId; + long value; + long sessionId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs new file mode 100644 index 0000000000..ea745cbb42 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ProducerInfo.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for ProducerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ProducerInfo : BaseCommand + { + public const byte ID_ProducerInfo = 6; + + ProducerId producerId; + ActiveMQDestination destination; + BrokerId[] brokerPath; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ProducerInfo; + } + + + // Properties + + public ProducerId ProducerId + { + get { return producerId; } + set { this.producerId = value; } + } + + public ActiveMQDestination Destination + { + get { return destination; } + set { this.destination = value; } + } + + public BrokerId[] BrokerPath + { + get { return brokerPath; } + set { this.brokerPath = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs new file mode 100644 index 0000000000..214088172d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveInfo.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for RemoveInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class RemoveInfo : BaseCommand + { + public const byte ID_RemoveInfo = 12; + + DataStructure objectId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_RemoveInfo; + } + + + // Properties + + public DataStructure ObjectId + { + get { return objectId; } + set { this.objectId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs new file mode 100644 index 0000000000..63bcdf8314 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/RemoveSubscriptionInfo.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for RemoveSubscriptionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class RemoveSubscriptionInfo : BaseCommand + { + public const byte ID_RemoveSubscriptionInfo = 0; + + ConnectionId connectionId; + string subcriptionName; + string clientId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_RemoveSubscriptionInfo; + } + + + // Properties + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + public string SubcriptionName + { + get { return subcriptionName; } + set { this.subcriptionName = value; } + } + + public string ClientId + { + get { return clientId; } + set { this.clientId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs b/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs new file mode 100644 index 0000000000..a6f7dca4e7 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/Response.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for Response +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class Response : BaseCommand + { + public const byte ID_Response = 30; + + short correlationId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_Response; + } + + + // Properties + + public short CorrelationId + { + get { return correlationId; } + set { this.correlationId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs new file mode 100644 index 0000000000..2dcbd3671e --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SessionId.cs @@ -0,0 +1,52 @@ +// +// Marshalling code for Open Wire Format for SessionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class SessionId : AbstractCommand + { + public const byte ID_SessionId = 121; + + string connectionId; + long value; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_SessionId; + } + + + // Properties + + public string ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + public long Value + { + get { return value; } + set { this.value = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs new file mode 100644 index 0000000000..4b6c5ef78d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SessionInfo.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for SessionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class SessionInfo : BaseCommand + { + public const byte ID_SessionInfo = 4; + + SessionId sessionId; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_SessionInfo; + } + + + // Properties + + public SessionId SessionId + { + get { return sessionId; } + set { this.sessionId = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs new file mode 100644 index 0000000000..fbfc32f3af --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/ShutdownInfo.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for ShutdownInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class ShutdownInfo : BaseCommand + { + public const byte ID_ShutdownInfo = 11; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_ShutdownInfo; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs new file mode 100644 index 0000000000..cfe41485a2 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/SubscriptionInfo.cs @@ -0,0 +1,66 @@ +// +// Marshalling code for Open Wire Format for SubscriptionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class SubscriptionInfo : AbstractCommand + { + public const byte ID_SubscriptionInfo = 55; + + string clientId; + ActiveMQDestination destination; + string selector; + string subcriptionName; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + 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; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs new file mode 100644 index 0000000000..491012cf89 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionId.cs @@ -0,0 +1,38 @@ +// +// Marshalling code for Open Wire Format for TransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class TransactionId : AbstractCommand + { + public const byte ID_TransactionId = 0; + + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_TransactionId; + } + + + // Properties + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs new file mode 100644 index 0000000000..0e79b5836c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/TransactionInfo.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for TransactionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class TransactionInfo : BaseCommand + { + public const byte ID_TransactionInfo = 7; + + ConnectionId connectionId; + TransactionId transactionId; + byte type; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_TransactionInfo; + } + + + // Properties + + public ConnectionId ConnectionId + { + get { return connectionId; } + set { this.connectionId = value; } + } + + public TransactionId TransactionId + { + get { return transactionId; } + set { this.transactionId = value; } + } + + public byte Type + { + get { return type; } + set { this.type = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs b/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs new file mode 100644 index 0000000000..0de4df4d89 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/WireFormatInfo.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for WireFormatInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class WireFormatInfo : AbstractCommand + { + public const byte ID_WireFormatInfo = 1; + + byte[] magic; + int version; + int options; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_WireFormatInfo; + } + + + // Properties + + public byte[] Magic + { + get { return magic; } + set { this.magic = value; } + } + + public int Version + { + get { return version; } + set { this.version = value; } + } + + public int Options + { + get { return options; } + set { this.options = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs b/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs new file mode 100644 index 0000000000..6d919fda2c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Commands/XATransactionId.cs @@ -0,0 +1,59 @@ +// +// Marshalling code for Open Wire Format for XATransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; + +using OpenWire.Client; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Commands +{ + public class XATransactionId : TransactionId + { + public const byte ID_XATransactionId = 112; + + int formatId; + byte[] globalTransactionId; + byte[] branchQualifier; + + + + // TODO generate Equals method + // TODO generate GetHashCode method + // TODO generate ToString method + + + public override byte GetCommandType() { + return ID_XATransactionId; + } + + + // Properties + + public int FormatId + { + get { return formatId; } + set { this.formatId = value; } + } + + public byte[] GlobalTransactionId + { + get { return globalTransactionId; } + set { this.globalTransactionId = value; } + } + + public byte[] BranchQualifier + { + get { return branchQualifier; } + set { this.branchQualifier = value; } + } + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs new file mode 100755 index 0000000000..2a0adb0542 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommand.cs @@ -0,0 +1,83 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// Summary description for AbstractCommand. + /// + public abstract class AbstractCommand : Command { + + protected AbstractCommand() { + } + + public virtual byte GetCommandType() { + return 0; + } + + public static String GetCommandTypeAsString(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; + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs new file mode 100755 index 0000000000..f6c0b181a9 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/AbstractCommandMarshaller.cs @@ -0,0 +1,105 @@ +using System; +using System.IO; + +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.Core { + /// + /// A base class with useful implementation inheritence methods + /// for creating marshallers of the OpenWire protocol + /// + public abstract class AbstractCommandMarshaller { + + public abstract Command CreateCommand(); + + public virtual Command ReadCommand(BinaryReader dataIn) { + Command command = CreateCommand(); + BuildCommand(command, dataIn); + return command; + } + + public virtual void BuildCommand(Command command, BinaryReader dataIn) { + // empty body to allow generated code to call base method + } + + public virtual void WriteCommand(Command command, BinaryWriter dataOut) { + // empty body to allow generated code to call base method + } + + protected virtual ActiveMQDestination ReadDestination(BinaryReader dataIn) { + return (ActiveMQDestination) CommandMarshallerRegistry.ReadCommand(dataIn); + } + + protected virtual void WriteDestination(ActiveMQDestination command, BinaryWriter dataOut) { + CommandMarshallerRegistry.WriteCommand(command, dataOut); + } + + protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + BrokerId[] answer = new BrokerId[size]; + for (int i = 0; i < size; i++) { + answer[i] = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteBrokerIds(BrokerId[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(commands[i], dataOut); + } + } + + + protected virtual BrokerInfo[] ReadBrokerInfos(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + BrokerInfo[] answer = new BrokerInfo[size]; + for (int i = 0; i < size; i++) { + answer[i] = (BrokerInfo) CommandMarshallerRegistry + .BrokerInfoMarshaller + .ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteBrokerInfos(BrokerInfo[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.BrokerInfoMarshaller.WriteCommand(commands[i], dataOut); + } + } + + + protected virtual DataStructure[] ReadDataStructures(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + DataStructure[] answer = new DataStructure[size]; + for (int i = 0; i < size; i++) { + answer[i] = (DataStructure) CommandMarshallerRegistry.ReadCommand(dataIn); + } + return answer; + } + + protected virtual void WriteDataStructures(DataStructure[] commands, BinaryWriter dataOut) { + int size = commands.Length; + dataOut.Write(size); + for (int i = 0; i < size; i++) { + CommandMarshallerRegistry.WriteCommand((Command) commands[i], dataOut); + } + } + + + protected virtual byte[] ReadBytes(BinaryReader dataIn) { + int size = dataIn.ReadInt32(); + return dataIn.ReadBytes(size); + } + + protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut) { + dataOut.Write(command.Length); + dataOut.Write(command); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs new file mode 100755 index 0000000000..47b4c5bc0c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQDestination.cs @@ -0,0 +1,444 @@ +using System; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + + /// + /// Summary description for ActiveMQDestination. + /// + public abstract class ActiveMQDestination : AbstractCommand, Destination { + + /** + * Topic Destination object + */ + public const int ACTIVEMQ_TOPIC = 1; + /** + * Temporary Topic Destination object + */ + public const int ACTIVEMQ_TEMPORARY_TOPIC = 2; + + /** + * Queue Destination object + */ + public const int ACTIVEMQ_QUEUE = 3; + /** + * Temporary Queue Destination object + */ + public const int ACTIVEMQ_TEMPORARY_QUEUE = 4; + + /** + * prefix for Advisory message destinations + */ + public const String ADVISORY_PREFIX = "ActiveMQ.Advisory."; + + /** + * prefix for consumer advisory destinations + */ + public const String CONSUMER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Consumers."; + + /** + * prefix for producer advisory destinations + */ + public const String PRODUCER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Producers."; + + /** + * prefix for connection advisory destinations + */ + public const String CONNECTION_ADVISORY_PREFIX = ADVISORY_PREFIX + "Connections."; + + /** + * The default target for ordered destinations + */ + public const String DEFAULT_ORDERED_TARGET = "coordinator"; + + private const int NULL_DESTINATION = 10; + + private const String TEMP_PREFIX = "{TD{"; + private const String TEMP_POSTFIX = "}TD}"; + private const String COMPOSITE_SEPARATOR = ","; + private const String QUEUE_PREFIX = "queue://"; + private const String TOPIC_PREFIX = "topic://"; + + + private String physicalName = ""; + + // Cached transient data + private bool exclusive; + private bool ordered; + private bool advisory; + private String orderedTarget = DEFAULT_ORDERED_TARGET; + + + /** + * The Default Constructor + */ + protected ActiveMQDestination() { + } + + /** + * Construct the Destination with a defined physical name; + * + * @param name + */ + protected ActiveMQDestination(String name) { + this.physicalName = name; + this.advisory = name != null && name.StartsWith(ADVISORY_PREFIX); + } + + + + /** + * @return Returns the advisory. + */ + public bool IsAdvisory() { + return advisory; + } + /** + * @param advisory The advisory to set. + */ + public void SetAdvisory(bool advisory) { + this.advisory = advisory; + } + + /** + * @return true if this is a destination for Consumer advisories + */ + public bool IsConsumerAdvisory() { + return IsAdvisory() && physicalName.StartsWith(CONSUMER_ADVISORY_PREFIX); + } + + /** + * @return true if this is a destination for Producer advisories + */ + public bool IsProducerAdvisory() { + return IsAdvisory() && physicalName.StartsWith(PRODUCER_ADVISORY_PREFIX); + } + + /** + * @return true if this is a destination for Connection advisories + */ + public bool IsConnectionAdvisory() { + return IsAdvisory() && physicalName.StartsWith(CONNECTION_ADVISORY_PREFIX); + } + + /** + * @return Returns the exclusive. + */ + public bool IsExclusive() { + return exclusive; + } + /** + * @param exclusive The exclusive to set. + */ + public void SetExclusive(bool exclusive) { + this.exclusive = exclusive; + } + /** + * @return Returns the ordered. + */ + public bool IsOrdered() { + return ordered; + } + /** + * @param ordered The ordered to set. + */ + public void SetOrdered(bool ordered) { + this.ordered = ordered; + } + /** + * @return Returns the orderedTarget. + */ + public String GetOrderedTarget() { + return orderedTarget; + } + /** + * @param orderedTarget The orderedTarget to set. + */ + public void SetOrderedTarget(String orderedTarget) { + this.orderedTarget = orderedTarget; + } + /** + * A helper method to return a descriptive string for the topic or queue + * @param destination + * + * @return a descriptive string for this queue or topic + */ + public static String Inspect(ActiveMQDestination destination) { + if (destination is Topic) { + return "Topic(" + destination.ToString() + ")"; + } else { + return "Queue(" + destination.ToString() + ")"; + } + } + + /** + * @param destination + * @return @throws JMSException + * @throws javax.jms.JMSException + */ + public static ActiveMQDestination transformDestination(Destination destination) { + ActiveMQDestination result = null; + if (destination != null) { + if (destination is ActiveMQDestination) { + result = (ActiveMQDestination) destination; + } else { + if (destination is TemporaryQueue) { + result = new ActiveMQTempQueue(((Queue) destination).QueueName); + } else if (destination is TemporaryTopic) { + result = new ActiveMQTempTopic(((Topic) destination).TopicName); + } else if (destination is Queue) { + result = new ActiveMQQueue(((Queue) destination).QueueName); + } else if (destination is Topic) { + result = new ActiveMQTopic(((Topic) destination).TopicName); + } + } + } + return result; + } + + /** + * Create a Destination + * @param type + * @param pyhsicalName + * @return + */ + public static ActiveMQDestination CreateDestination(int type, String pyhsicalName) { + ActiveMQDestination result = null; + if (type == ACTIVEMQ_TOPIC) { + result = new ActiveMQTopic(pyhsicalName); + } else if (type == ACTIVEMQ_TEMPORARY_TOPIC) { + result = new ActiveMQTempTopic(pyhsicalName); + } else if (type == ACTIVEMQ_QUEUE) { + result = new ActiveMQQueue(pyhsicalName); + } else { + result = new ActiveMQTempQueue(pyhsicalName); + } + return result; + } + + /** + * Create a temporary name from the clientId + * + * @param clientId + * @return + */ + public static String CreateTemporaryName(String clientId) { + return TEMP_PREFIX + clientId + TEMP_POSTFIX; + } + + /** + * From a temporary destination find the clientId of the Connection that created it + * + * @param destination + * @return the clientId or null if not a temporary destination + */ + public static String GetClientId(ActiveMQDestination destination) { + String answer = null; + if (destination != null && destination.IsTemporary()) { + String name = destination.PhysicalName; + int start = name.IndexOf(TEMP_PREFIX); + if (start >= 0) { + start += TEMP_PREFIX.Length; + int stop = name.LastIndexOf(TEMP_POSTFIX); + if (stop > start && stop < name.Length) { + answer = name.Substring(start, stop); + } + } + } + return answer; + } + + + /** + * @param o object to compare + * @return 1 if this is less than o else 0 if they are equal or -1 if this is less than o + */ + public int CompareTo(Object o) { + if (o is ActiveMQDestination) { + return CompareTo((ActiveMQDestination) o); + } + return -1; + } + + /** + * Lets sort by name first then lets sort topics greater than queues + * + * @param that another destination to compare against + * @return 1 if this is less than o else 0 if they are equal or -1 if this is less than o + */ + public int CompareTo(ActiveMQDestination that) { + int answer = 0; + if (physicalName != that.physicalName) { + if (physicalName == null) { + return -1; + } else if (that.physicalName == null) { + return 1; + } + answer = physicalName.CompareTo(that.physicalName); + } + if (answer == 0) { + if (IsTopic()) { + if (that.IsQueue()) { + return 1; + } + } else { + if (that.IsTopic()) { + return -1; + } + } + } + return answer; + } + + + /** + * @return Returns the Destination type + */ + + public abstract int GetDestinationType(); + + + public String PhysicalName { + get { return this.physicalName; } + set { this.physicalName = value; } + } + + /** + * Returns true if a temporary Destination + * + * @return true/false + */ + + public bool IsTemporary() { + return GetDestinationType() == ACTIVEMQ_TEMPORARY_TOPIC + || GetDestinationType() == ACTIVEMQ_TEMPORARY_QUEUE; + } + + /** + * Returns true if a Topic Destination + * + * @return true/false + */ + + public bool IsTopic() { + return GetDestinationType() == ACTIVEMQ_TOPIC + || GetDestinationType() == ACTIVEMQ_TEMPORARY_TOPIC; + } + + /** + * Returns true if a Queue Destination + * + * @return true/false + */ + public bool IsQueue() { + return !IsTopic(); + } + + /** + * Returns true if this destination represents a collection of + * destinations; allowing a set of destinations to be published to or subscribed + * from in one JMS operation. + *

+ * If this destination is a composite then you can call {@link #getChildDestinations()} + * to return the list of child destinations. + * + * @return true if this destination represents a collection of child destinations. + */ + public bool IsComposite() { + return physicalName.IndexOf(COMPOSITE_SEPARATOR) > 0; + } + + /** + * Returns a list of child destinations if this destination represents a composite + * destination. + * + * @return + */ + /*public List GetChildDestinations() { + List answer = new ArrayList(); + StringTokenizer iter = new StringTokenizer(physicalName, COMPOSITE_SEPARATOR); + while (iter.hasMoreTokens()) { + String name = iter.nextToken(); + Destination child = null; + if (name.StartsWith(QUEUE_PREFIX)) { + child = new ActiveMQQueue(name.Substring(QUEUE_PREFIX.Length)); + } + else if (name.StartsWith(TOPIC_PREFIX)) { + child = new ActiveMQTopic(name.Substring(TOPIC_PREFIX.Length)); + } + else { + child = createDestination(name); + } + answer.add(child); + } + if (answer.size() == 1) { + // lets put ourselves inside the collection + // as we are not really a composite destination + answer.set(0, this); + } + return answer; + }*/ + + /** + * @return string representation of this instance + */ + + public override String ToString() { + return this.physicalName; + } + + /** + * @return hashCode for this instance + */ + + public override int GetHashCode() { + int answer = 37; + + if (this.physicalName != null) { + answer = physicalName.GetHashCode(); + } + if (IsTopic()) { + answer ^= 0xfabfab; + } + return answer; + } + + /** + * if the object passed in is equivalent, return true + * + * @param obj the object to compare + * @return true if this instance and obj are equivalent + */ + + public override bool Equals(Object obj) { + bool result = this == obj; + if (!result && obj != null && obj is ActiveMQDestination) { + ActiveMQDestination other = (ActiveMQDestination) obj; + result = this.GetDestinationType() == other.GetDestinationType() + && this.physicalName.Equals(other.physicalName); + } + return result; + } + + + /** + * @return true if the destination matches multiple possible destinations + */ + public bool IsWildcard() { + if (physicalName != null) { + return physicalName.IndexOf(DestinationFilter.ANY_CHILD) >= 0 + || physicalName.IndexOf(DestinationFilter.ANY_DESCENDENT) >= 0; + } + return false; + } + + + /** + * Factory method to create a child destination if this destination is a composite + * @param name + * @return the created Destination + */ + public abstract ActiveMQDestination CreateDestination(String name); + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs new file mode 100755 index 0000000000..a382512db7 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQQueue.cs @@ -0,0 +1,30 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + ///

+ /// Summary description for ActiveMQQueue. + /// + public class ActiveMQQueue : ActiveMQDestination, Queue { + public const byte ID_ActiveMQQueue = 100; + + public ActiveMQQueue() : base() { + } + public ActiveMQQueue(String name) : base(name) { + } + + public String QueueName { + get { return PhysicalName; } + } + + public override int GetDestinationType() { + return ACTIVEMQ_QUEUE; + } + + public override ActiveMQDestination CreateDestination(String name) { + return new ActiveMQQueue(name); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs new file mode 100755 index 0000000000..3771d312cd --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempQueue.cs @@ -0,0 +1,30 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// Summary description for ActiveMQTempQueue. + /// + public class ActiveMQTempQueue : ActiveMQDestination, TemporaryQueue { + public const byte ID_ActiveMQTempQueue = 102; + + public ActiveMQTempQueue() : base() { + } + public ActiveMQTempQueue(String name) : base(name) { + } + + public String GetQueueName() { + return PhysicalName; + } + + public override int GetDestinationType() { + return ACTIVEMQ_QUEUE; + } + + public override ActiveMQDestination CreateDestination(String name) { + return new ActiveMQTempQueue(name); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs new file mode 100755 index 0000000000..ea2564fcc6 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTempTopic.cs @@ -0,0 +1,29 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// Summary description for ActiveMQTempTopic. + /// + public class ActiveMQTempTopic : ActiveMQDestination, TemporaryTopic { + public const byte ID_ActiveMQTempTopic = 103; + + public ActiveMQTempTopic() : base() { + } + public ActiveMQTempTopic(String name) : base(name) { + } + + public String GetTopicName() { + return PhysicalName; + } + public override int GetDestinationType() { + return ACTIVEMQ_TOPIC; + } + + public override ActiveMQDestination CreateDestination(String name) { + return new ActiveMQTempTopic(name); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs new file mode 100755 index 0000000000..4dc2eaaeda --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/ActiveMQTopic.cs @@ -0,0 +1,30 @@ +using System; +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// Summary description for ActiveMQTopic. + /// + public class ActiveMQTopic : ActiveMQDestination, Topic { + public const byte ID_ActiveMQTopic = 101; + + public ActiveMQTopic() : base() { + } + public ActiveMQTopic(String name) : base(name) { + } + + public String TopicName { + get { return PhysicalName; } + } + + public override int GetDestinationType() { + return ACTIVEMQ_TOPIC; + } + + public override ActiveMQDestination CreateDestination(String name) { + return new ActiveMQTopic(name); + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/Command.cs b/openwire-dotnet/src/OpenWire.Client/Core/Command.cs new file mode 100755 index 0000000000..325cc89e5c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/Command.cs @@ -0,0 +1,10 @@ +using System; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// An OpenWire command + /// + public interface Command : DataStructure { + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs b/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs new file mode 100755 index 0000000000..6d90b9a48e --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Core/DataStructure.cs @@ -0,0 +1,12 @@ +using System; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Core { + /// + /// An OpenWire command + /// + public interface DataStructure { + + byte GetCommandType(); + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Destination.cs b/openwire-dotnet/src/OpenWire.Client/Destination.cs new file mode 100755 index 0000000000..303bc1e08a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Destination.cs @@ -0,0 +1,10 @@ +using System; +using OpenWire.Client.Commands; + +namespace OpenWire.Client { + /// + /// Summary description for Destination. + /// + public interface Destination { + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/DestinationFilter.cs b/openwire-dotnet/src/OpenWire.Client/DestinationFilter.cs new file mode 100755 index 0000000000..eabbf538e9 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/DestinationFilter.cs @@ -0,0 +1,19 @@ +using System; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client { + /// + /// Summary description for DestinationFilter. + /// + public abstract class DestinationFilter { + public const String ANY_DESCENDENT = ">"; + public const String ANY_CHILD = "*"; + + public bool matches(ActiveMQMessage message) { + return matches(message.Destination); + } + + public abstract bool matches(ActiveMQDestination destination); + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs new file mode 100644 index 0000000000..ad2fac13b8 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQBytesMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQBytesMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQBytesMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs new file mode 100644 index 0000000000..0e2425f72d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQDestinationMarshaller.cs @@ -0,0 +1,41 @@ +// +// Marshalling code for Open Wire Format for ActiveMQDestination +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public abstract class ActiveMQDestinationMarshaller : AbstractCommandMarshaller + { + + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ActiveMQDestination info = (ActiveMQDestination) command; + info.PhysicalName = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ActiveMQDestination info = (ActiveMQDestination) command; + dataOut.Write(info.PhysicalName); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs new file mode 100644 index 0000000000..9af66d2f80 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMapMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQMapMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQMapMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs new file mode 100644 index 0000000000..a80e05841a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQMessageMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs new file mode 100644 index 0000000000..18b293189f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQObjectMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQObjectMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQObjectMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs new file mode 100644 index 0000000000..02fe08106a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQQueueMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQQueue +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQQueueMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQQueue(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs new file mode 100644 index 0000000000..58d0607ce6 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQStreamMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQStreamMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQStreamMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs new file mode 100644 index 0000000000..ab5c27a828 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempDestinationMarshaller.cs @@ -0,0 +1,35 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTempDestination +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public abstract class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller + { + + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs new file mode 100644 index 0000000000..192e5b661f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempQueueMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTempQueue +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQTempQueueMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQTempQueue(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs new file mode 100644 index 0000000000..d3d97d53e2 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTempTopicMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTempTopic +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQTempTopicMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQTempTopic(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs new file mode 100644 index 0000000000..7da1129cfa --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTextMessageMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTextMessage +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQTextMessage(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs new file mode 100644 index 0000000000..c658e57775 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ActiveMQTopicMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ActiveMQTopic +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ActiveMQTopicMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ActiveMQTopic(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs new file mode 100644 index 0000000000..4156c0ac31 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/BaseCommandMarshaller.cs @@ -0,0 +1,43 @@ +// +// Marshalling code for Open Wire Format for BaseCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public abstract class BaseCommandMarshaller : AbstractCommandMarshaller + { + + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + BaseCommand info = (BaseCommand) command; + info.CommandId = dataIn.ReadInt16(); + info.ResponseRequired = dataIn.ReadBoolean(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + BaseCommand info = (BaseCommand) command; + dataOut.Write(info.CommandId); + dataOut.Write(info.ResponseRequired); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs new file mode 100644 index 0000000000..2a86de694a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/BrokerIdMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for BrokerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class BrokerIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new BrokerId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + BrokerId info = (BrokerId) command; + info.Value = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + BrokerId info = (BrokerId) command; + dataOut.Write(info.Value); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs new file mode 100644 index 0000000000..2dac8baa34 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/BrokerInfoMarshaller.cs @@ -0,0 +1,51 @@ +// +// Marshalling code for Open Wire Format for BrokerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class BrokerInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new BrokerInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + BrokerInfo info = (BrokerInfo) command; + info.BrokerId = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn); + info.BrokerURL = dataIn.ReadString(); + info.PeerBrokerInfos = ReadBrokerInfos(dataIn); + info.BrokerName = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + BrokerInfo info = (BrokerInfo) command; + CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(info.BrokerId, dataOut); + dataOut.Write(info.BrokerURL); + WriteBrokerInfos(info.PeerBrokerInfos, dataOut); + dataOut.Write(info.BrokerName); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs b/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs new file mode 100644 index 0000000000..57ca6dc699 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/CommandMarshallerRegistry.cs @@ -0,0 +1,1018 @@ +// +// Marshalling code for Open Wire Format for ExceptionResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class CommandMarshallerRegistry + { + public static Command ReadCommand(BinaryReader dataIn) + { + byte commandID = dataIn.ReadByte(); + switch (commandID) + { + + case MessageId.ID_MessageId: + return messageIdMarshaller.ReadCommand(dataIn); + + + case BrokerInfo.ID_BrokerInfo: + return brokerInfoMarshaller.ReadCommand(dataIn); + + + case ActiveMQTempQueue.ID_ActiveMQTempQueue: + return activeMQTempQueueMarshaller.ReadCommand(dataIn); + + + case LocalTransactionId.ID_LocalTransactionId: + return localTransactionIdMarshaller.ReadCommand(dataIn); + + + case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo: + return removeSubscriptionInfoMarshaller.ReadCommand(dataIn); + + + case IntegerResponse.ID_IntegerResponse: + return integerResponseMarshaller.ReadCommand(dataIn); + + + case ActiveMQQueue.ID_ActiveMQQueue: + return activeMQQueueMarshaller.ReadCommand(dataIn); + + + case DestinationInfo.ID_DestinationInfo: + return destinationInfoMarshaller.ReadCommand(dataIn); + + + case ActiveMQBytesMessage.ID_ActiveMQBytesMessage: + return activeMQBytesMessageMarshaller.ReadCommand(dataIn); + + + case ShutdownInfo.ID_ShutdownInfo: + return shutdownInfoMarshaller.ReadCommand(dataIn); + + + case DataResponse.ID_DataResponse: + return dataResponseMarshaller.ReadCommand(dataIn); + + + case SessionId.ID_SessionId: + return sessionIdMarshaller.ReadCommand(dataIn); + + + case DataArrayResponse.ID_DataArrayResponse: + return dataArrayResponseMarshaller.ReadCommand(dataIn); + + + case JournalQueueAck.ID_JournalQueueAck: + return journalQueueAckMarshaller.ReadCommand(dataIn); + + + case WireFormatInfo.ID_WireFormatInfo: + return wireFormatInfoMarshaller.ReadCommand(dataIn); + + + case Response.ID_Response: + return responseMarshaller.ReadCommand(dataIn); + + + case ConnectionError.ID_ConnectionError: + return connectionErrorMarshaller.ReadCommand(dataIn); + + + case ActiveMQObjectMessage.ID_ActiveMQObjectMessage: + return activeMQObjectMessageMarshaller.ReadCommand(dataIn); + + + case ConsumerInfo.ID_ConsumerInfo: + return consumerInfoMarshaller.ReadCommand(dataIn); + + + case ConnectionId.ID_ConnectionId: + return connectionIdMarshaller.ReadCommand(dataIn); + + + case ActiveMQTempTopic.ID_ActiveMQTempTopic: + return activeMQTempTopicMarshaller.ReadCommand(dataIn); + + + case DiscoveryEvent.ID_DiscoveryEvent: + return discoveryEventMarshaller.ReadCommand(dataIn); + + + case ConnectionInfo.ID_ConnectionInfo: + return connectionInfoMarshaller.ReadCommand(dataIn); + + + case KeepAliveInfo.ID_KeepAliveInfo: + return keepAliveInfoMarshaller.ReadCommand(dataIn); + + + case XATransactionId.ID_XATransactionId: + return xATransactionIdMarshaller.ReadCommand(dataIn); + + + case JournalTrace.ID_JournalTrace: + return journalTraceMarshaller.ReadCommand(dataIn); + + + case FlushCommand.ID_FlushCommand: + return flushCommandMarshaller.ReadCommand(dataIn); + + + case ConsumerId.ID_ConsumerId: + return consumerIdMarshaller.ReadCommand(dataIn); + + + case JournalTopicAck.ID_JournalTopicAck: + return journalTopicAckMarshaller.ReadCommand(dataIn); + + + case ActiveMQTextMessage.ID_ActiveMQTextMessage: + return activeMQTextMessageMarshaller.ReadCommand(dataIn); + + + case BrokerId.ID_BrokerId: + return brokerIdMarshaller.ReadCommand(dataIn); + + + case MessageDispatch.ID_MessageDispatch: + return messageDispatchMarshaller.ReadCommand(dataIn); + + + case ProducerInfo.ID_ProducerInfo: + return producerInfoMarshaller.ReadCommand(dataIn); + + + case SubscriptionInfo.ID_SubscriptionInfo: + return subscriptionInfoMarshaller.ReadCommand(dataIn); + + + case ActiveMQMapMessage.ID_ActiveMQMapMessage: + return activeMQMapMessageMarshaller.ReadCommand(dataIn); + + + case SessionInfo.ID_SessionInfo: + return sessionInfoMarshaller.ReadCommand(dataIn); + + + case ActiveMQMessage.ID_ActiveMQMessage: + return activeMQMessageMarshaller.ReadCommand(dataIn); + + + case TransactionInfo.ID_TransactionInfo: + return transactionInfoMarshaller.ReadCommand(dataIn); + + + case ActiveMQStreamMessage.ID_ActiveMQStreamMessage: + return activeMQStreamMessageMarshaller.ReadCommand(dataIn); + + + case MessageAck.ID_MessageAck: + return messageAckMarshaller.ReadCommand(dataIn); + + + case ProducerId.ID_ProducerId: + return producerIdMarshaller.ReadCommand(dataIn); + + + case ActiveMQTopic.ID_ActiveMQTopic: + return activeMQTopicMarshaller.ReadCommand(dataIn); + + + case JournalTransaction.ID_JournalTransaction: + return journalTransactionMarshaller.ReadCommand(dataIn); + + + case RemoveInfo.ID_RemoveInfo: + return removeInfoMarshaller.ReadCommand(dataIn); + + + case ControlCommand.ID_ControlCommand: + return controlCommandMarshaller.ReadCommand(dataIn); + + + case ExceptionResponse.ID_ExceptionResponse: + return exceptionResponseMarshaller.ReadCommand(dataIn); + + + default: + throw new Exception("Unknown command type: " + commandID); + } + } + + + public static void WriteCommand(Command command, BinaryWriter dataOut) + { + byte commandID = command.GetCommandType(); + dataOut.Write(commandID); + switch (commandID) + { + + case MessageId.ID_MessageId: + messageIdMarshaller.WriteCommand(command, dataOut); + break; + + + case BrokerInfo.ID_BrokerInfo: + brokerInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQTempQueue.ID_ActiveMQTempQueue: + activeMQTempQueueMarshaller.WriteCommand(command, dataOut); + break; + + + case LocalTransactionId.ID_LocalTransactionId: + localTransactionIdMarshaller.WriteCommand(command, dataOut); + break; + + + case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo: + removeSubscriptionInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case IntegerResponse.ID_IntegerResponse: + integerResponseMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQQueue.ID_ActiveMQQueue: + activeMQQueueMarshaller.WriteCommand(command, dataOut); + break; + + + case DestinationInfo.ID_DestinationInfo: + destinationInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQBytesMessage.ID_ActiveMQBytesMessage: + activeMQBytesMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case ShutdownInfo.ID_ShutdownInfo: + shutdownInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case DataResponse.ID_DataResponse: + dataResponseMarshaller.WriteCommand(command, dataOut); + break; + + + case SessionId.ID_SessionId: + sessionIdMarshaller.WriteCommand(command, dataOut); + break; + + + case DataArrayResponse.ID_DataArrayResponse: + dataArrayResponseMarshaller.WriteCommand(command, dataOut); + break; + + + case JournalQueueAck.ID_JournalQueueAck: + journalQueueAckMarshaller.WriteCommand(command, dataOut); + break; + + + case WireFormatInfo.ID_WireFormatInfo: + wireFormatInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case Response.ID_Response: + responseMarshaller.WriteCommand(command, dataOut); + break; + + + case ConnectionError.ID_ConnectionError: + connectionErrorMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQObjectMessage.ID_ActiveMQObjectMessage: + activeMQObjectMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case ConsumerInfo.ID_ConsumerInfo: + consumerInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ConnectionId.ID_ConnectionId: + connectionIdMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQTempTopic.ID_ActiveMQTempTopic: + activeMQTempTopicMarshaller.WriteCommand(command, dataOut); + break; + + + case DiscoveryEvent.ID_DiscoveryEvent: + discoveryEventMarshaller.WriteCommand(command, dataOut); + break; + + + case ConnectionInfo.ID_ConnectionInfo: + connectionInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case KeepAliveInfo.ID_KeepAliveInfo: + keepAliveInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case XATransactionId.ID_XATransactionId: + xATransactionIdMarshaller.WriteCommand(command, dataOut); + break; + + + case JournalTrace.ID_JournalTrace: + journalTraceMarshaller.WriteCommand(command, dataOut); + break; + + + case FlushCommand.ID_FlushCommand: + flushCommandMarshaller.WriteCommand(command, dataOut); + break; + + + case ConsumerId.ID_ConsumerId: + consumerIdMarshaller.WriteCommand(command, dataOut); + break; + + + case JournalTopicAck.ID_JournalTopicAck: + journalTopicAckMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQTextMessage.ID_ActiveMQTextMessage: + activeMQTextMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case BrokerId.ID_BrokerId: + brokerIdMarshaller.WriteCommand(command, dataOut); + break; + + + case MessageDispatch.ID_MessageDispatch: + messageDispatchMarshaller.WriteCommand(command, dataOut); + break; + + + case ProducerInfo.ID_ProducerInfo: + producerInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case SubscriptionInfo.ID_SubscriptionInfo: + subscriptionInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQMapMessage.ID_ActiveMQMapMessage: + activeMQMapMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case SessionInfo.ID_SessionInfo: + sessionInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQMessage.ID_ActiveMQMessage: + activeMQMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case TransactionInfo.ID_TransactionInfo: + transactionInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQStreamMessage.ID_ActiveMQStreamMessage: + activeMQStreamMessageMarshaller.WriteCommand(command, dataOut); + break; + + + case MessageAck.ID_MessageAck: + messageAckMarshaller.WriteCommand(command, dataOut); + break; + + + case ProducerId.ID_ProducerId: + producerIdMarshaller.WriteCommand(command, dataOut); + break; + + + case ActiveMQTopic.ID_ActiveMQTopic: + activeMQTopicMarshaller.WriteCommand(command, dataOut); + break; + + + case JournalTransaction.ID_JournalTransaction: + journalTransactionMarshaller.WriteCommand(command, dataOut); + break; + + + case RemoveInfo.ID_RemoveInfo: + removeInfoMarshaller.WriteCommand(command, dataOut); + break; + + + case ControlCommand.ID_ControlCommand: + controlCommandMarshaller.WriteCommand(command, dataOut); + break; + + + case ExceptionResponse.ID_ExceptionResponse: + exceptionResponseMarshaller.WriteCommand(command, dataOut); + break; + + + default: + throw new Exception("Unknown command type: " + commandID); + } + } + + + // Properties + + + private static MessageIdMarshaller messageIdMarshaller = new MessageIdMarshaller(); + + public static MessageIdMarshaller MessageIdMarshaller + { + get + { + return messageIdMarshaller; + } + } + + + + private static BrokerInfoMarshaller brokerInfoMarshaller = new BrokerInfoMarshaller(); + + public static BrokerInfoMarshaller BrokerInfoMarshaller + { + get + { + return brokerInfoMarshaller; + } + } + + + + private static ActiveMQTempQueueMarshaller activeMQTempQueueMarshaller = new ActiveMQTempQueueMarshaller(); + + public static ActiveMQTempQueueMarshaller ActiveMQTempQueueMarshaller + { + get + { + return activeMQTempQueueMarshaller; + } + } + + + + private static LocalTransactionIdMarshaller localTransactionIdMarshaller = new LocalTransactionIdMarshaller(); + + public static LocalTransactionIdMarshaller LocalTransactionIdMarshaller + { + get + { + return localTransactionIdMarshaller; + } + } + + + + private static RemoveSubscriptionInfoMarshaller removeSubscriptionInfoMarshaller = new RemoveSubscriptionInfoMarshaller(); + + public static RemoveSubscriptionInfoMarshaller RemoveSubscriptionInfoMarshaller + { + get + { + return removeSubscriptionInfoMarshaller; + } + } + + + + private static IntegerResponseMarshaller integerResponseMarshaller = new IntegerResponseMarshaller(); + + public static IntegerResponseMarshaller IntegerResponseMarshaller + { + get + { + return integerResponseMarshaller; + } + } + + + + private static ActiveMQQueueMarshaller activeMQQueueMarshaller = new ActiveMQQueueMarshaller(); + + public static ActiveMQQueueMarshaller ActiveMQQueueMarshaller + { + get + { + return activeMQQueueMarshaller; + } + } + + + + private static DestinationInfoMarshaller destinationInfoMarshaller = new DestinationInfoMarshaller(); + + public static DestinationInfoMarshaller DestinationInfoMarshaller + { + get + { + return destinationInfoMarshaller; + } + } + + + + private static ActiveMQBytesMessageMarshaller activeMQBytesMessageMarshaller = new ActiveMQBytesMessageMarshaller(); + + public static ActiveMQBytesMessageMarshaller ActiveMQBytesMessageMarshaller + { + get + { + return activeMQBytesMessageMarshaller; + } + } + + + + private static ShutdownInfoMarshaller shutdownInfoMarshaller = new ShutdownInfoMarshaller(); + + public static ShutdownInfoMarshaller ShutdownInfoMarshaller + { + get + { + return shutdownInfoMarshaller; + } + } + + + + private static DataResponseMarshaller dataResponseMarshaller = new DataResponseMarshaller(); + + public static DataResponseMarshaller DataResponseMarshaller + { + get + { + return dataResponseMarshaller; + } + } + + + + private static SessionIdMarshaller sessionIdMarshaller = new SessionIdMarshaller(); + + public static SessionIdMarshaller SessionIdMarshaller + { + get + { + return sessionIdMarshaller; + } + } + + + + private static DataArrayResponseMarshaller dataArrayResponseMarshaller = new DataArrayResponseMarshaller(); + + public static DataArrayResponseMarshaller DataArrayResponseMarshaller + { + get + { + return dataArrayResponseMarshaller; + } + } + + + + private static JournalQueueAckMarshaller journalQueueAckMarshaller = new JournalQueueAckMarshaller(); + + public static JournalQueueAckMarshaller JournalQueueAckMarshaller + { + get + { + return journalQueueAckMarshaller; + } + } + + + + private static WireFormatInfoMarshaller wireFormatInfoMarshaller = new WireFormatInfoMarshaller(); + + public static WireFormatInfoMarshaller WireFormatInfoMarshaller + { + get + { + return wireFormatInfoMarshaller; + } + } + + + + private static ResponseMarshaller responseMarshaller = new ResponseMarshaller(); + + public static ResponseMarshaller ResponseMarshaller + { + get + { + return responseMarshaller; + } + } + + + + private static ConnectionErrorMarshaller connectionErrorMarshaller = new ConnectionErrorMarshaller(); + + public static ConnectionErrorMarshaller ConnectionErrorMarshaller + { + get + { + return connectionErrorMarshaller; + } + } + + + + private static ActiveMQObjectMessageMarshaller activeMQObjectMessageMarshaller = new ActiveMQObjectMessageMarshaller(); + + public static ActiveMQObjectMessageMarshaller ActiveMQObjectMessageMarshaller + { + get + { + return activeMQObjectMessageMarshaller; + } + } + + + + private static ConsumerInfoMarshaller consumerInfoMarshaller = new ConsumerInfoMarshaller(); + + public static ConsumerInfoMarshaller ConsumerInfoMarshaller + { + get + { + return consumerInfoMarshaller; + } + } + + + + private static ConnectionIdMarshaller connectionIdMarshaller = new ConnectionIdMarshaller(); + + public static ConnectionIdMarshaller ConnectionIdMarshaller + { + get + { + return connectionIdMarshaller; + } + } + + + + private static ActiveMQTempTopicMarshaller activeMQTempTopicMarshaller = new ActiveMQTempTopicMarshaller(); + + public static ActiveMQTempTopicMarshaller ActiveMQTempTopicMarshaller + { + get + { + return activeMQTempTopicMarshaller; + } + } + + + + private static DiscoveryEventMarshaller discoveryEventMarshaller = new DiscoveryEventMarshaller(); + + public static DiscoveryEventMarshaller DiscoveryEventMarshaller + { + get + { + return discoveryEventMarshaller; + } + } + + + + private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller(); + + public static ConnectionInfoMarshaller ConnectionInfoMarshaller + { + get + { + return connectionInfoMarshaller; + } + } + + + + private static KeepAliveInfoMarshaller keepAliveInfoMarshaller = new KeepAliveInfoMarshaller(); + + public static KeepAliveInfoMarshaller KeepAliveInfoMarshaller + { + get + { + return keepAliveInfoMarshaller; + } + } + + + + private static XATransactionIdMarshaller xATransactionIdMarshaller = new XATransactionIdMarshaller(); + + public static XATransactionIdMarshaller XATransactionIdMarshaller + { + get + { + return xATransactionIdMarshaller; + } + } + + + + private static JournalTraceMarshaller journalTraceMarshaller = new JournalTraceMarshaller(); + + public static JournalTraceMarshaller JournalTraceMarshaller + { + get + { + return journalTraceMarshaller; + } + } + + + + private static FlushCommandMarshaller flushCommandMarshaller = new FlushCommandMarshaller(); + + public static FlushCommandMarshaller FlushCommandMarshaller + { + get + { + return flushCommandMarshaller; + } + } + + + + private static ConsumerIdMarshaller consumerIdMarshaller = new ConsumerIdMarshaller(); + + public static ConsumerIdMarshaller ConsumerIdMarshaller + { + get + { + return consumerIdMarshaller; + } + } + + + + private static JournalTopicAckMarshaller journalTopicAckMarshaller = new JournalTopicAckMarshaller(); + + public static JournalTopicAckMarshaller JournalTopicAckMarshaller + { + get + { + return journalTopicAckMarshaller; + } + } + + + + private static ActiveMQTextMessageMarshaller activeMQTextMessageMarshaller = new ActiveMQTextMessageMarshaller(); + + public static ActiveMQTextMessageMarshaller ActiveMQTextMessageMarshaller + { + get + { + return activeMQTextMessageMarshaller; + } + } + + + + private static BrokerIdMarshaller brokerIdMarshaller = new BrokerIdMarshaller(); + + public static BrokerIdMarshaller BrokerIdMarshaller + { + get + { + return brokerIdMarshaller; + } + } + + + + private static MessageDispatchMarshaller messageDispatchMarshaller = new MessageDispatchMarshaller(); + + public static MessageDispatchMarshaller MessageDispatchMarshaller + { + get + { + return messageDispatchMarshaller; + } + } + + + + private static ProducerInfoMarshaller producerInfoMarshaller = new ProducerInfoMarshaller(); + + public static ProducerInfoMarshaller ProducerInfoMarshaller + { + get + { + return producerInfoMarshaller; + } + } + + + + private static SubscriptionInfoMarshaller subscriptionInfoMarshaller = new SubscriptionInfoMarshaller(); + + public static SubscriptionInfoMarshaller SubscriptionInfoMarshaller + { + get + { + return subscriptionInfoMarshaller; + } + } + + + + private static ActiveMQMapMessageMarshaller activeMQMapMessageMarshaller = new ActiveMQMapMessageMarshaller(); + + public static ActiveMQMapMessageMarshaller ActiveMQMapMessageMarshaller + { + get + { + return activeMQMapMessageMarshaller; + } + } + + + + private static SessionInfoMarshaller sessionInfoMarshaller = new SessionInfoMarshaller(); + + public static SessionInfoMarshaller SessionInfoMarshaller + { + get + { + return sessionInfoMarshaller; + } + } + + + + private static ActiveMQMessageMarshaller activeMQMessageMarshaller = new ActiveMQMessageMarshaller(); + + public static ActiveMQMessageMarshaller ActiveMQMessageMarshaller + { + get + { + return activeMQMessageMarshaller; + } + } + + + + private static TransactionInfoMarshaller transactionInfoMarshaller = new TransactionInfoMarshaller(); + + public static TransactionInfoMarshaller TransactionInfoMarshaller + { + get + { + return transactionInfoMarshaller; + } + } + + + + private static ActiveMQStreamMessageMarshaller activeMQStreamMessageMarshaller = new ActiveMQStreamMessageMarshaller(); + + public static ActiveMQStreamMessageMarshaller ActiveMQStreamMessageMarshaller + { + get + { + return activeMQStreamMessageMarshaller; + } + } + + + + private static MessageAckMarshaller messageAckMarshaller = new MessageAckMarshaller(); + + public static MessageAckMarshaller MessageAckMarshaller + { + get + { + return messageAckMarshaller; + } + } + + + + private static ProducerIdMarshaller producerIdMarshaller = new ProducerIdMarshaller(); + + public static ProducerIdMarshaller ProducerIdMarshaller + { + get + { + return producerIdMarshaller; + } + } + + + + private static ActiveMQTopicMarshaller activeMQTopicMarshaller = new ActiveMQTopicMarshaller(); + + public static ActiveMQTopicMarshaller ActiveMQTopicMarshaller + { + get + { + return activeMQTopicMarshaller; + } + } + + + + private static JournalTransactionMarshaller journalTransactionMarshaller = new JournalTransactionMarshaller(); + + public static JournalTransactionMarshaller JournalTransactionMarshaller + { + get + { + return journalTransactionMarshaller; + } + } + + + + private static RemoveInfoMarshaller removeInfoMarshaller = new RemoveInfoMarshaller(); + + public static RemoveInfoMarshaller RemoveInfoMarshaller + { + get + { + return removeInfoMarshaller; + } + } + + + + private static ControlCommandMarshaller controlCommandMarshaller = new ControlCommandMarshaller(); + + public static ControlCommandMarshaller ControlCommandMarshaller + { + get + { + return controlCommandMarshaller; + } + } + + + + private static ExceptionResponseMarshaller exceptionResponseMarshaller = new ExceptionResponseMarshaller(); + + public static ExceptionResponseMarshaller ExceptionResponseMarshaller + { + get + { + return exceptionResponseMarshaller; + } + } + + + + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs new file mode 100644 index 0000000000..79e6d8d028 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionErrorMarshaller.cs @@ -0,0 +1,47 @@ +// +// Marshalling code for Open Wire Format for ConnectionError +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ConnectionErrorMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ConnectionError(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ConnectionError info = (ConnectionError) command; + info.Exception = ReadBytes(dataIn); + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ConnectionError info = (ConnectionError) command; + WriteBytes(info.Exception, dataOut); + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs new file mode 100644 index 0000000000..2156f60c02 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionIdMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ConnectionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ConnectionIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ConnectionId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ConnectionId info = (ConnectionId) command; + info.Value = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ConnectionId info = (ConnectionId) command; + dataOut.Write(info.Value); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs new file mode 100644 index 0000000000..3820118f54 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConnectionInfoMarshaller.cs @@ -0,0 +1,53 @@ +// +// Marshalling code for Open Wire Format for ConnectionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ConnectionInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ConnectionInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ConnectionInfo info = (ConnectionInfo) command; + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + info.ClientId = dataIn.ReadString(); + info.Password = dataIn.ReadString(); + info.UserName = dataIn.ReadString(); + info.BrokerPath = ReadBrokerIds(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ConnectionInfo info = (ConnectionInfo) command; + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + dataOut.Write(info.ClientId); + dataOut.Write(info.Password); + dataOut.Write(info.UserName); + WriteBrokerIds(info.BrokerPath, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs new file mode 100644 index 0000000000..c81d96f47f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerIdMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for ConsumerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ConsumerIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ConsumerId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ConsumerId info = (ConsumerId) command; + info.ConnectionId = dataIn.ReadString(); + info.SessionId = dataIn.ReadInt64(); + info.Value = dataIn.ReadInt64(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ConsumerId info = (ConsumerId) command; + dataOut.Write(info.ConnectionId); + dataOut.Write(info.SessionId); + dataOut.Write(info.Value); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs new file mode 100644 index 0000000000..158930e0de --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ConsumerInfoMarshaller.cs @@ -0,0 +1,69 @@ +// +// Marshalling code for Open Wire Format for ConsumerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ConsumerInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ConsumerInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ConsumerInfo info = (ConsumerInfo) command; + info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); + info.Browser = dataIn.ReadBoolean(); + info.Destination = ReadDestination(dataIn); + info.PrefetchSize = dataIn.ReadInt32(); + info.DispatchAsync = dataIn.ReadBoolean(); + info.Selector = dataIn.ReadString(); + info.SubcriptionName = dataIn.ReadString(); + info.NoLocal = dataIn.ReadBoolean(); + info.Exclusive = dataIn.ReadBoolean(); + info.Retroactive = dataIn.ReadBoolean(); + info.Priority = dataIn.ReadByte(); + info.BrokerPath = ReadBrokerIds(dataIn); + info.NetworkSubscription = dataIn.ReadBoolean(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ConsumerInfo info = (ConsumerInfo) command; + CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); + dataOut.Write(info.Browser); + WriteDestination(info.Destination, dataOut); + dataOut.Write(info.PrefetchSize); + dataOut.Write(info.DispatchAsync); + dataOut.Write(info.Selector); + dataOut.Write(info.SubcriptionName); + dataOut.Write(info.NoLocal); + dataOut.Write(info.Exclusive); + dataOut.Write(info.Retroactive); + dataOut.Write(info.Priority); + WriteBrokerIds(info.BrokerPath, dataOut); + dataOut.Write(info.NetworkSubscription); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs new file mode 100644 index 0000000000..c9ae1d5fbe --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ControlCommandMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ControlCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ControlCommandMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ControlCommand(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ControlCommand info = (ControlCommand) command; + info.Command = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ControlCommand info = (ControlCommand) command; + dataOut.Write(info.Command); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs new file mode 100644 index 0000000000..452199953a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/DataArrayResponseMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for DataArrayResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class DataArrayResponseMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new DataArrayResponse(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + DataArrayResponse info = (DataArrayResponse) command; + info.Data = ReadDataStructures(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + DataArrayResponse info = (DataArrayResponse) command; + WriteDataStructures(info.Data, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs new file mode 100644 index 0000000000..70946a5454 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/DataResponseMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for DataResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class DataResponseMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new DataResponse(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + DataResponse info = (DataResponse) command; + info.Data = CommandMarshallerRegistry.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + DataResponse info = (DataResponse) command; + CommandMarshallerRegistry.WriteCommand((Command) info.Data, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs new file mode 100644 index 0000000000..268e387557 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/DestinationInfoMarshaller.cs @@ -0,0 +1,53 @@ +// +// Marshalling code for Open Wire Format for DestinationInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class DestinationInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new DestinationInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + DestinationInfo info = (DestinationInfo) command; + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + info.Destination = ReadDestination(dataIn); + info.OperationType = dataIn.ReadByte(); + info.Timeout = dataIn.ReadInt64(); + info.BrokerPath = ReadBrokerIds(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + DestinationInfo info = (DestinationInfo) command; + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + WriteDestination(info.Destination, dataOut); + dataOut.Write(info.OperationType); + dataOut.Write(info.Timeout); + WriteBrokerIds(info.BrokerPath, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs new file mode 100644 index 0000000000..4780f504bf --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/DiscoveryEventMarshaller.cs @@ -0,0 +1,47 @@ +// +// Marshalling code for Open Wire Format for DiscoveryEvent +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class DiscoveryEventMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new DiscoveryEvent(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + DiscoveryEvent info = (DiscoveryEvent) command; + info.ServiceName = dataIn.ReadString(); + info.BrokerName = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + DiscoveryEvent info = (DiscoveryEvent) command; + dataOut.Write(info.ServiceName); + dataOut.Write(info.BrokerName); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs new file mode 100644 index 0000000000..57961d6ebd --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ExceptionResponseMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for ExceptionResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ExceptionResponseMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ExceptionResponse(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ExceptionResponse info = (ExceptionResponse) command; + info.Exception = ReadBytes(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ExceptionResponse info = (ExceptionResponse) command; + WriteBytes(info.Exception, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs new file mode 100644 index 0000000000..86e8279dcc --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/FlushCommandMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for FlushCommand +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class FlushCommandMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new FlushCommand(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs new file mode 100644 index 0000000000..d1ce19886d --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/IntegerResponseMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for IntegerResponse +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class IntegerResponseMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new IntegerResponse(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + IntegerResponse info = (IntegerResponse) command; + info.Result = dataIn.ReadInt32(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + IntegerResponse info = (IntegerResponse) command; + dataOut.Write(info.Result); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs new file mode 100644 index 0000000000..0c0715bf9c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalQueueAckMarshaller.cs @@ -0,0 +1,47 @@ +// +// Marshalling code for Open Wire Format for JournalQueueAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class JournalQueueAckMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new JournalQueueAck(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + JournalQueueAck info = (JournalQueueAck) command; + info.Destination = ReadDestination(dataIn); + info.MessageAck = (MessageAck) CommandMarshallerRegistry.MessageAckMarshaller.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + JournalQueueAck info = (JournalQueueAck) command; + WriteDestination(info.Destination, dataOut); + CommandMarshallerRegistry.MessageAckMarshaller.WriteCommand(info.MessageAck, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs new file mode 100644 index 0000000000..aabdd5a823 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTopicAckMarshaller.cs @@ -0,0 +1,55 @@ +// +// Marshalling code for Open Wire Format for JournalTopicAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class JournalTopicAckMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new JournalTopicAck(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + JournalTopicAck info = (JournalTopicAck) command; + info.Destination = ReadDestination(dataIn); + info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); + info.MessageSequenceId = dataIn.ReadInt64(); + info.SubscritionName = dataIn.ReadString(); + info.ClientId = dataIn.ReadString(); + info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + JournalTopicAck info = (JournalTopicAck) command; + WriteDestination(info.Destination, dataOut); + CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut); + dataOut.Write(info.MessageSequenceId); + dataOut.Write(info.SubscritionName); + dataOut.Write(info.ClientId); + CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs new file mode 100644 index 0000000000..c60a9c7dd9 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTraceMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for JournalTrace +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class JournalTraceMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new JournalTrace(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + JournalTrace info = (JournalTrace) command; + info.Message = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + JournalTrace info = (JournalTrace) command; + dataOut.Write(info.Message); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs new file mode 100644 index 0000000000..42b843817c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/JournalTransactionMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for JournalTransaction +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class JournalTransactionMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new JournalTransaction(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + JournalTransaction info = (JournalTransaction) command; + info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + info.Type = dataIn.ReadByte(); + info.WasPrepared = dataIn.ReadBoolean(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + JournalTransaction info = (JournalTransaction) command; + CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); + dataOut.Write(info.Type); + dataOut.Write(info.WasPrepared); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs new file mode 100644 index 0000000000..618d83cc6a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/KeepAliveInfoMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for KeepAliveInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class KeepAliveInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new KeepAliveInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs new file mode 100644 index 0000000000..7f563d2779 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/LocalTransactionIdMarshaller.cs @@ -0,0 +1,47 @@ +// +// Marshalling code for Open Wire Format for LocalTransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class LocalTransactionIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new LocalTransactionId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + LocalTransactionId info = (LocalTransactionId) command; + info.Value = dataIn.ReadInt64(); + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + LocalTransactionId info = (LocalTransactionId) command; + dataOut.Write(info.Value); + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs new file mode 100644 index 0000000000..eb19e6e932 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageAckMarshaller.cs @@ -0,0 +1,57 @@ +// +// Marshalling code for Open Wire Format for MessageAck +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class MessageAckMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new MessageAck(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + MessageAck info = (MessageAck) command; + info.Destination = ReadDestination(dataIn); + info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); + info.AckType = dataIn.ReadByte(); + info.FirstMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); + info.LastMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); + info.MessageCount = dataIn.ReadInt32(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + MessageAck info = (MessageAck) command; + WriteDestination(info.Destination, dataOut); + CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); + CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); + dataOut.Write(info.AckType); + CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId, dataOut); + CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.LastMessageId, dataOut); + dataOut.Write(info.MessageCount); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs new file mode 100644 index 0000000000..23e1592424 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageDispatchMarshaller.cs @@ -0,0 +1,51 @@ +// +// Marshalling code for Open Wire Format for MessageDispatch +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class MessageDispatchMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new MessageDispatch(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + MessageDispatch info = (MessageDispatch) command; + info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); + info.Destination = ReadDestination(dataIn); + info.Message = (Message) CommandMarshallerRegistry.ReadCommand(dataIn); + info.RedeliveryCounter = dataIn.ReadInt32(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + MessageDispatch info = (MessageDispatch) command; + CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut); + WriteDestination(info.Destination, dataOut); + CommandMarshallerRegistry.WriteCommand(info.Message, dataOut); + dataOut.Write(info.RedeliveryCounter); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs new file mode 100644 index 0000000000..de1aa7fc8f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageIdMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for MessageId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class MessageIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new MessageId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + MessageId info = (MessageId) command; + info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn); + info.ProducerSequenceId = dataIn.ReadInt64(); + info.BrokerSequenceId = dataIn.ReadInt64(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + MessageId info = (MessageId) command; + CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); + dataOut.Write(info.ProducerSequenceId); + dataOut.Write(info.BrokerSequenceId); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs new file mode 100644 index 0000000000..678ba78ee4 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/MessageMarshaller.cs @@ -0,0 +1,89 @@ +// +// Marshalling code for Open Wire Format for Message +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public abstract class MessageMarshaller : AbstractCommandMarshaller + { + + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + Message info = (Message) command; + info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn); + info.Destination = ReadDestination(dataIn); + info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + info.OriginalDestination = ReadDestination(dataIn); + info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn); + info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + info.GroupID = dataIn.ReadString(); + info.GroupSequence = dataIn.ReadInt32(); + info.CorrelationId = dataIn.ReadString(); + info.Persistent = dataIn.ReadBoolean(); + info.Expiration = dataIn.ReadInt64(); + info.Priority = dataIn.ReadByte(); + info.ReplyTo = ReadDestination(dataIn); + info.Timestamp = dataIn.ReadInt64(); + info.Type = dataIn.ReadString(); + info.Content = ReadBytes(dataIn); + info.MarshalledProperties = ReadBytes(dataIn); + info.DataStructure = CommandMarshallerRegistry.ReadCommand(dataIn); + info.TargetConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn); + info.Compressed = dataIn.ReadBoolean(); + info.RedeliveryCounter = dataIn.ReadInt32(); + info.BrokerPath = ReadBrokerIds(dataIn); + info.Arrival = dataIn.ReadInt64(); + info.UserID = dataIn.ReadString(); + info.RecievedByDFBridge = dataIn.ReadBoolean(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + Message info = (Message) command; + CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); + WriteDestination(info.Destination, dataOut); + CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); + WriteDestination(info.OriginalDestination, dataOut); + CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut); + CommandMarshallerRegistry.WriteCommand(info.OriginalTransactionId, dataOut); + dataOut.Write(info.GroupID); + dataOut.Write(info.GroupSequence); + dataOut.Write(info.CorrelationId); + dataOut.Write(info.Persistent); + dataOut.Write(info.Expiration); + dataOut.Write(info.Priority); + WriteDestination(info.ReplyTo, dataOut); + dataOut.Write(info.Timestamp); + dataOut.Write(info.Type); + WriteBytes(info.Content, dataOut); + WriteBytes(info.MarshalledProperties, dataOut); + CommandMarshallerRegistry.WriteCommand((Command) info.DataStructure, dataOut); + CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.TargetConsumerId, dataOut); + dataOut.Write(info.Compressed); + dataOut.Write(info.RedeliveryCounter); + WriteBrokerIds(info.BrokerPath, dataOut); + dataOut.Write(info.Arrival); + dataOut.Write(info.UserID); + dataOut.Write(info.RecievedByDFBridge); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs new file mode 100644 index 0000000000..0060ebb39a --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ProducerIdMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for ProducerId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ProducerIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ProducerId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ProducerId info = (ProducerId) command; + info.ConnectionId = dataIn.ReadString(); + info.Value = dataIn.ReadInt64(); + info.SessionId = dataIn.ReadInt64(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ProducerId info = (ProducerId) command; + dataOut.Write(info.ConnectionId); + dataOut.Write(info.Value); + dataOut.Write(info.SessionId); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs new file mode 100644 index 0000000000..8645f0bea4 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ProducerInfoMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for ProducerInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ProducerInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ProducerInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + ProducerInfo info = (ProducerInfo) command; + info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn); + info.Destination = ReadDestination(dataIn); + info.BrokerPath = ReadBrokerIds(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + ProducerInfo info = (ProducerInfo) command; + CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut); + WriteDestination(info.Destination, dataOut); + WriteBrokerIds(info.BrokerPath, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs new file mode 100644 index 0000000000..c285a35506 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/RemoveInfoMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for RemoveInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class RemoveInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new RemoveInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + RemoveInfo info = (RemoveInfo) command; + info.ObjectId = CommandMarshallerRegistry.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + RemoveInfo info = (RemoveInfo) command; + CommandMarshallerRegistry.WriteCommand((Command) info.ObjectId, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs new file mode 100644 index 0000000000..d4e5779a4e --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/RemoveSubscriptionInfoMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for RemoveSubscriptionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class RemoveSubscriptionInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new RemoveSubscriptionInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command; + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + info.SubcriptionName = dataIn.ReadString(); + info.ClientId = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command; + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + dataOut.Write(info.SubcriptionName); + dataOut.Write(info.ClientId); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs new file mode 100644 index 0000000000..de57e629b7 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ResponseMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for Response +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ResponseMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new Response(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + Response info = (Response) command; + info.CorrelationId = dataIn.ReadInt16(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + Response info = (Response) command; + dataOut.Write(info.CorrelationId); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs new file mode 100644 index 0000000000..4489ba06dc --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/SessionIdMarshaller.cs @@ -0,0 +1,47 @@ +// +// Marshalling code for Open Wire Format for SessionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class SessionIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new SessionId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + SessionId info = (SessionId) command; + info.ConnectionId = dataIn.ReadString(); + info.Value = dataIn.ReadInt64(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + SessionId info = (SessionId) command; + dataOut.Write(info.ConnectionId); + dataOut.Write(info.Value); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs new file mode 100644 index 0000000000..98d3eca2f0 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/SessionInfoMarshaller.cs @@ -0,0 +1,45 @@ +// +// Marshalling code for Open Wire Format for SessionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class SessionInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new SessionInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + SessionInfo info = (SessionInfo) command; + info.SessionId = (SessionId) CommandMarshallerRegistry.SessionIdMarshaller.ReadCommand(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + SessionInfo info = (SessionInfo) command; + CommandMarshallerRegistry.SessionIdMarshaller.WriteCommand(info.SessionId, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs new file mode 100644 index 0000000000..a3acf8c222 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/ShutdownInfoMarshaller.cs @@ -0,0 +1,39 @@ +// +// Marshalling code for Open Wire Format for ShutdownInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class ShutdownInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new ShutdownInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs new file mode 100644 index 0000000000..89ef5c24a2 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/SubscriptionInfoMarshaller.cs @@ -0,0 +1,51 @@ +// +// Marshalling code for Open Wire Format for SubscriptionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class SubscriptionInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new SubscriptionInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + SubscriptionInfo info = (SubscriptionInfo) command; + info.ClientId = dataIn.ReadString(); + info.Destination = ReadDestination(dataIn); + info.Selector = dataIn.ReadString(); + info.SubcriptionName = dataIn.ReadString(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + SubscriptionInfo info = (SubscriptionInfo) command; + dataOut.Write(info.ClientId); + WriteDestination(info.Destination, dataOut); + dataOut.Write(info.Selector); + dataOut.Write(info.SubcriptionName); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs new file mode 100644 index 0000000000..bda7ad6023 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/TransactionIdMarshaller.cs @@ -0,0 +1,35 @@ +// +// Marshalling code for Open Wire Format for TransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public abstract class TransactionIdMarshaller : AbstractCommandMarshaller + { + + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs new file mode 100644 index 0000000000..3da2386083 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/TransactionInfoMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for TransactionInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class TransactionInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new TransactionInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + TransactionInfo info = (TransactionInfo) command; + info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn); + info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn); + info.Type = dataIn.ReadByte(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + TransactionInfo info = (TransactionInfo) command; + CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut); + CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut); + dataOut.Write(info.Type); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs new file mode 100644 index 0000000000..bbbf550551 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/WireFormatInfoMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for WireFormatInfo +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class WireFormatInfoMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new WireFormatInfo(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + WireFormatInfo info = (WireFormatInfo) command; + info.Magic = ReadBytes(dataIn); + info.Version = dataIn.ReadInt32(); + info.Options = dataIn.ReadInt32(); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + WireFormatInfo info = (WireFormatInfo) command; + WriteBytes(info.Magic, dataOut); + dataOut.Write(info.Version); + dataOut.Write(info.Options); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs b/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs new file mode 100644 index 0000000000..154793b933 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/IO/XATransactionIdMarshaller.cs @@ -0,0 +1,49 @@ +// +// Marshalling code for Open Wire Format for XATransactionId +// +// +// NOTE!: This file is autogenerated - do not modify! +// if you need to make a change, please see the Groovy scripts in the +// activemq-openwire module +// + +using System; +using System.Collections; +using System.IO; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; +using OpenWire.Client.IO; + +namespace OpenWire.Client.IO +{ + public class XATransactionIdMarshaller : AbstractCommandMarshaller + { + + + public override Command CreateCommand() { + return new XATransactionId(); + } + + public override void BuildCommand(Command command, BinaryReader dataIn) { + base.BuildCommand(command, dataIn); + + XATransactionId info = (XATransactionId) command; + info.FormatId = dataIn.ReadInt32(); + info.GlobalTransactionId = ReadBytes(dataIn); + info.BranchQualifier = ReadBytes(dataIn); + + } + + public override void WriteCommand(Command command, BinaryWriter dataOut) { + base.WriteCommand(command, dataOut); + + XATransactionId info = (XATransactionId) command; + dataOut.Write(info.FormatId); + WriteBytes(info.GlobalTransactionId, dataOut); + WriteBytes(info.BranchQualifier, dataOut); + + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/OpenWire.Client.build b/openwire-dotnet/src/OpenWire.Client/OpenWire.Client.build new file mode 100755 index 0000000000..682eb2601e --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/OpenWire.Client.build @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openwire-dotnet/src/OpenWire.Client/Queue.cs b/openwire-dotnet/src/OpenWire.Client/Queue.cs new file mode 100755 index 0000000000..3ad258c5ea --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Queue.cs @@ -0,0 +1,14 @@ +using System; +using OpenWire.Client.Commands; + +namespace OpenWire.Client { + /// + /// Summary description for Queue. + /// + public interface Queue : Destination { + + String QueueName { + get; + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs b/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs new file mode 100755 index 0000000000..7bdb1c59ee --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/TemporaryQueue.cs @@ -0,0 +1,10 @@ +using System; +using OpenWire.Client.Commands; + +namespace OpenWire.Client { + /// + /// Summary description for TemporaryQueue. + /// + public interface TemporaryQueue : Destination { + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs b/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs new file mode 100755 index 0000000000..060525eb9f --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/TemporaryTopic.cs @@ -0,0 +1,10 @@ +using System; +using OpenWire.Client.Commands; + +namespace OpenWire.Client { + /// + /// Summary description for TemporaryTopic. + /// + public interface TemporaryTopic : Destination { + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Topic.cs b/openwire-dotnet/src/OpenWire.Client/Topic.cs new file mode 100755 index 0000000000..eb76667f25 --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Topic.cs @@ -0,0 +1,14 @@ +using System; +using OpenWire.Client.Commands; + +namespace OpenWire.Client { + /// + /// Summary description for Topic. + /// + public interface Topic : Destination { + + String TopicName { + get; + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs b/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs new file mode 100755 index 0000000000..388a562f7c --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Transport/FutureResponse.cs @@ -0,0 +1,44 @@ +using System; +using System.Threading; + +using OpenWire.Client; +using OpenWire.Client.Commands; + +namespace OpenWire.Client.Transport { + /// + /// Handles asynchronous responses + /// + public class FutureResponse : IAsyncResult { + + private Response response; + private Mutex asyncWaitHandle = new Mutex(); + private bool isCompleted; + + public WaitHandle AsyncWaitHandle { + get { return asyncWaitHandle; } + } + + public object AsyncState { + get { return response; } + set { response = (Response) value; } + } + + public bool IsCompleted { + get { return isCompleted; } + } + + public bool CompletedSynchronously { + get { return false; } + } + + public Response Response { + get { return response; } + set { + asyncWaitHandle.WaitOne(); + response = value; + isCompleted = true; + asyncWaitHandle.ReleaseMutex(); + } + } + } +} diff --git a/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs b/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs new file mode 100755 index 0000000000..0b333f90de --- /dev/null +++ b/openwire-dotnet/src/OpenWire.Client/Transport/Transport.cs @@ -0,0 +1,25 @@ +using System; + +using OpenWire.Client; +using OpenWire.Client.Commands; +using OpenWire.Client.Core; + +namespace OpenWire.Client.Transport { + + public delegate void CommandHandler(Transport sender, Command command); + public delegate void ExceptionHandler(Transport sender, Exception command); + + /// + /// Represents the logical networking transport layer. + /// + public interface Transport { + void Oneway(Command command); + + FutureResponse AsyncRequest(Command command); + + Response Request(Command command); + + event CommandHandler Command; + event ExceptionHandler Exception; + } +} diff --git a/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build b/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build new file mode 100755 index 0000000000..682eb2601e --- /dev/null +++ b/openwire-dotnet/tests/OpenWire.Client/OpenWire.Client.build @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +