Close to compiling OpenWire.Net

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-01-07 13:47:39 +00:00
parent 10681a29b8
commit 0a503f5393
74 changed files with 1327 additions and 132 deletions

View File

@ -1,6 +1,9 @@
using System;
using System.IO;
using OpenWire.Core.Commands;
using OpenWire.Core.IO;
namespace OpenWire.Core
{
/// <summary>
@ -11,6 +14,13 @@ namespace OpenWire.Core
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)
{
}
@ -19,14 +29,76 @@ namespace OpenWire.Core
{
}
protected virtual BrokerId ReadBrokerId(BinaryReader dataIn)
protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn)
{
return brokerIDMarshaller.ReadCommand();
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 WriteBrokerId(BrokerId command, BinaryWriter dataOut)
protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut)
{
brokerIDMarshaller.WriteCommand(command, dataOut);
dataOut.Write(command.Length);
dataOut.Write(command);
}
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQBytesMessage : ActiveMQMessage
{
public const int ID_ActiveMQBytesMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQBytesMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQDestination : AbstractCommand
{
public const int ID_ActiveMQDestination = 1;
string physicalName;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQDestination;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQMapMessage : ActiveMQMessage
{
public const int ID_ActiveMQMapMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQMapMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQMessage : AbstractCommand
{
public const int ID_ActiveMQMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQObjectMessage : ActiveMQMessage
{
public const int ID_ActiveMQObjectMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQObjectMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQQueue : AbstractCommand
{
public const int ID_ActiveMQQueue = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQQueue;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQStreamMessage : ActiveMQMessage
{
public const int ID_ActiveMQStreamMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQStreamMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQTempDestination : AbstractCommand
{
public const int ID_ActiveMQTempDestination = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQTempDestination;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQTempQueue : AbstractCommand
{
public const int ID_ActiveMQTempQueue = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQTempQueue;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQTempTopic : AbstractCommand
{
public const int ID_ActiveMQTempTopic = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQTempTopic;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQTextMessage : ActiveMQMessage
{
public const int ID_ActiveMQTextMessage = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQTextMessage;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ActiveMQTopic : AbstractCommand
{
public const int ID_ActiveMQTopic = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ActiveMQTopic;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class BaseCommand : AbstractCommand
{
public const int ID_BaseCommand = 1;
short commandId;
bool responseRequired;
@ -27,7 +29,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_BaseCommand;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class BrokerId : AbstractCommand
{
public const int ID_BrokerId = 1;
string brokerId;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_BrokerId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class BrokerInfo : AbstractCommand
{
public const int ID_BrokerInfo = 1;
BrokerId brokerId;
string brokerURL;
BrokerInfo[] peerBrokerInfos;
@ -29,7 +31,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_BrokerInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ConnectionId : AbstractCommand
{
public const int ID_ConnectionId = 1;
string connectionId;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ConnectionId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ConnectionInfo : AbstractCommand
{
public const int ID_ConnectionInfo = 1;
ConnectionId connectionId;
string clientId;
string password;
@ -30,7 +32,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ConnectionInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ConsumerId : AbstractCommand
{
public const int ID_ConsumerId = 1;
string connectionId;
long sessionId;
long consumerId;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ConsumerId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ConsumerInfo : AbstractCommand
{
public const int ID_ConsumerInfo = 1;
ConsumerId consumerId;
bool browser;
ActiveMQDestination destination;
@ -38,7 +40,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ConsumerInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ControlCommand : AbstractCommand
{
public const int ID_ControlCommand = 1;
string command;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ControlCommand;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class DataArrayResponse : AbstractCommand
{
public const int ID_DataArrayResponse = 1;
Command[] data;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_DataArrayResponse;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class DataResponse : AbstractCommand
{
public const int ID_DataResponse = 1;
Command data;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_DataResponse;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class DestinationInfo : AbstractCommand
{
public const int ID_DestinationInfo = 1;
ConnectionId connectionId;
ActiveMQDestination destination;
byte operationType;
@ -30,7 +32,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_DestinationInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ExceptionResponse : AbstractCommand
{
public const int ID_ExceptionResponse = 1;
string exception;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ExceptionResponse;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class FlushCommand : AbstractCommand
{
public const int ID_FlushCommand = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_FlushCommand;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class IntegerResponse : AbstractCommand
{
public const int ID_IntegerResponse = 1;
int result;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_IntegerResponse;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class JournalQueueAck : AbstractCommand
{
public const int ID_JournalQueueAck = 1;
ActiveMQDestination destination;
MessageAck messageAck;
@ -27,7 +29,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_JournalQueueAck;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class JournalTopicAck : AbstractCommand
{
public const int ID_JournalTopicAck = 1;
ActiveMQDestination destination;
MessageId messageId;
long messageSequenceId;
@ -31,7 +33,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_JournalTopicAck;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class JournalTrace : AbstractCommand
{
public const int ID_JournalTrace = 1;
string message;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_JournalTrace;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class JournalTransaction : AbstractCommand
{
public const int ID_JournalTransaction = 1;
TransactionId transactionId;
byte type;
bool wasPrepared;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_JournalTransaction;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class KeepAliveInfo : AbstractCommand
{
public const int ID_KeepAliveInfo = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_KeepAliveInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class LocalTransactionId : AbstractCommand
{
public const int ID_LocalTransactionId = 1;
long transactionId;
ConnectionId connectionId;
@ -27,7 +29,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_LocalTransactionId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class Message : AbstractCommand
{
public const int ID_Message = 1;
ProducerId producerId;
ActiveMQDestination destination;
TransactionId transactionId;
@ -50,7 +52,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_Message;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class MessageAck : AbstractCommand
{
public const int ID_MessageAck = 1;
ActiveMQDestination destination;
TransactionId transactionId;
ConsumerId consumerId;
@ -32,7 +34,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_MessageAck;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class MessageDispatch : AbstractCommand
{
public const int ID_MessageDispatch = 1;
ConsumerId consumerId;
ActiveMQDestination destination;
Message message;
@ -29,7 +31,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_MessageDispatch;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class MessageId : AbstractCommand
{
public const int ID_MessageId = 1;
ProducerId producerId;
long producerSequenceId;
long brokerSequenceId;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_MessageId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ProducerId : AbstractCommand
{
public const int ID_ProducerId = 1;
string connectionId;
long producerId;
long sessionId;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ProducerId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ProducerInfo : AbstractCommand
{
public const int ID_ProducerInfo = 1;
ProducerId producerId;
ActiveMQDestination destination;
BrokerId[] brokerPath;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ProducerInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class RemoveInfo : AbstractCommand
{
public const int ID_RemoveInfo = 1;
Command objectId;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_RemoveInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class RemoveSubscriptionInfo : AbstractCommand
{
public const int ID_RemoveSubscriptionInfo = 1;
ConnectionId connectionId;
string subcriptionName;
string clientId;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_RemoveSubscriptionInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class Response : AbstractCommand
{
public const int ID_Response = 1;
short correlationId;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_Response;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class SessionId : AbstractCommand
{
public const int ID_SessionId = 1;
string connectionId;
long sessionId;
@ -27,7 +29,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_SessionId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class SessionInfo : AbstractCommand
{
public const int ID_SessionInfo = 1;
SessionId sessionId;
@ -26,7 +28,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_SessionInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class ShutdownInfo : AbstractCommand
{
public const int ID_ShutdownInfo = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_ShutdownInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class SubscriptionInfo : AbstractCommand
{
public const int ID_SubscriptionInfo = 1;
string clientId;
ActiveMQDestination destination;
string selector;
@ -29,7 +31,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_SubscriptionInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class TransactionId : AbstractCommand
{
public const int ID_TransactionId = 1;
@ -25,7 +27,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_TransactionId;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class TransactionInfo : AbstractCommand
{
public const int ID_TransactionInfo = 1;
ConnectionId connectionId;
TransactionId transactionId;
byte type;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_TransactionInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class WireFormatInfo : AbstractCommand
{
public const int ID_WireFormatInfo = 1;
byte[] magic;
int version;
int options;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_WireFormatInfo;
}

View File

@ -16,6 +16,8 @@ namespace OpenWire.Core.Commands
{
public class XATransactionId : AbstractCommand
{
public const int ID_XATransactionId = 1;
int formatId;
byte[] globalTransactionId;
byte[] branchQualifier;
@ -28,7 +30,7 @@ namespace OpenWire.Core.Commands
public override int GetCommandType() {
return 1;
return ID_XATransactionId;
}

View File

@ -0,0 +1,14 @@
using System;
namespace OpenWire.Core
{
/// <summary>
/// An OpenWire command
/// </summary>
public interface DataStructure {
int GetCommandType();
}
}

View File

@ -29,9 +29,9 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
BrokerInfo info = (BrokerInfo) command;
info.BrokerId = ReadBrokerId(dataIn);
info.BrokerId = (BrokerId) CommandMarshallerRegistry.BrokerIdMarshaller.ReadCommand(dataIn);
info.BrokerURL = dataIn.ReadString();
info.PeerBrokerInfos = ReadBrokerInfo[](dataIn);
info.PeerBrokerInfos = ReadBrokerInfos(dataIn);
info.BrokerName = dataIn.ReadString();
}
@ -40,9 +40,9 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
BrokerInfo info = (BrokerInfo) command;
WriteBrokerId(info.BrokerId, dataOut);
CommandMarshallerRegistry.BrokerIdMarshaller.WriteCommand(info.BrokerId, dataOut);
dataOut.Write(info.BrokerURL);
WriteBrokerInfo[](info.PeerBrokerInfos, dataOut);
WriteBrokerInfos(info.PeerBrokerInfos, dataOut);
dataOut.Write(info.BrokerName);
}

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
ConnectionInfo info = (ConnectionInfo) command;
info.ConnectionId = ReadConnectionId(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
info.ClientId = dataIn.ReadString();
info.Password = dataIn.ReadString();
info.UserName = dataIn.ReadString();
@ -41,11 +41,11 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
ConnectionInfo info = (ConnectionInfo) command;
WriteConnectionId(info.ConnectionId, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
dataOut.Write(info.ClientId);
dataOut.Write(info.Password);
dataOut.Write(info.UserName);
dataOut.WriteBrokerIds(info.BrokerPath);
WriteBrokerIds(info.BrokerPath, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
ConsumerInfo info = (ConsumerInfo) command;
info.ConsumerId = ReadConsumerId(dataIn);
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
info.Browser = dataIn.ReadBoolean();
info.Destination = ReadDestination(dataIn);
info.PrefetchSize = dataIn.ReadInt32();
@ -49,7 +49,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
ConsumerInfo info = (ConsumerInfo) command;
WriteConsumerId(info.ConsumerId, dataOut);
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
dataOut.Write(info.Browser);
WriteDestination(info.Destination, dataOut);
dataOut.Write(info.PrefetchSize);
@ -60,7 +60,7 @@ namespace OpenWire.Core.IO
dataOut.Write(info.Exclusive);
dataOut.Write(info.Retroactive);
dataOut.Write(info.Priority);
dataOut.WriteBrokerIds(info.BrokerPath);
WriteBrokerIds(info.BrokerPath, dataOut);
dataOut.Write(info.NetworkSubscription);
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
DataArrayResponse info = (DataArrayResponse) command;
info.Data = ReadDataStructure[](dataIn);
info.Data = ReadDataStructures(dataIn);
}
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
DataArrayResponse info = (DataArrayResponse) command;
WriteDataStructure[](info.Data, dataOut);
WriteDataStructures(info.Data, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
DataResponse info = (DataResponse) command;
info.Data = ReadDataStructure(dataIn);
info.Data = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
}
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
DataResponse info = (DataResponse) command;
WriteDataStructure(info.Data, dataOut);
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.Data, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
DestinationInfo info = (DestinationInfo) command;
info.ConnectionId = ReadConnectionId(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
info.Destination = ReadDestination(dataIn);
info.OperationType = dataIn.ReadByte();
info.Timeout = dataIn.ReadInt64();
@ -41,11 +41,11 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
DestinationInfo info = (DestinationInfo) command;
WriteConnectionId(info.ConnectionId, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
WriteDestination(info.Destination, dataOut);
dataOut.Write(info.OperationType);
dataOut.Write(info.Timeout);
dataOut.WriteBrokerIds(info.BrokerPath);
WriteBrokerIds(info.BrokerPath, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
ExceptionResponse info = (ExceptionResponse) command;
info.Exception = ReadThrowable(dataIn);
info.Exception = (Throwable) CommandMarshallerRegistry.ThrowableMarshaller.ReadCommand(dataIn);
}
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
ExceptionResponse info = (ExceptionResponse) command;
WriteThrowable(info.Exception, dataOut);
CommandMarshallerRegistry.ThrowableMarshaller.WriteCommand(info.Exception, dataOut);
}
}

View File

@ -30,7 +30,7 @@ namespace OpenWire.Core.IO
JournalQueueAck info = (JournalQueueAck) command;
info.Destination = ReadDestination(dataIn);
info.MessageAck = ReadMessageAck(dataIn);
info.MessageAck = (MessageAck) CommandMarshallerRegistry.MessageAckMarshaller.ReadCommand(dataIn);
}
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
JournalQueueAck info = (JournalQueueAck) command;
WriteDestination(info.Destination, dataOut);
WriteMessageAck(info.MessageAck, dataOut);
CommandMarshallerRegistry.MessageAckMarshaller.WriteCommand(info.MessageAck, dataOut);
}
}

View File

@ -30,11 +30,11 @@ namespace OpenWire.Core.IO
JournalTopicAck info = (JournalTopicAck) command;
info.Destination = ReadDestination(dataIn);
info.MessageId = ReadMessageId(dataIn);
info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
info.MessageSequenceId = dataIn.ReadInt64();
info.SubscritionName = dataIn.ReadString();
info.ClientId = dataIn.ReadString();
info.TransactionId = ReadTransactionId(dataIn);
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
}
@ -43,11 +43,11 @@ namespace OpenWire.Core.IO
JournalTopicAck info = (JournalTopicAck) command;
WriteDestination(info.Destination, dataOut);
WriteMessageId(info.MessageId, dataOut);
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut);
dataOut.Write(info.MessageSequenceId);
dataOut.Write(info.SubscritionName);
dataOut.Write(info.ClientId);
WriteTransactionId(info.TransactionId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
JournalTransaction info = (JournalTransaction) command;
info.TransactionId = ReadTransactionId(dataIn);
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
info.Type = dataIn.ReadByte();
info.WasPrepared = dataIn.ReadBoolean();
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
JournalTransaction info = (JournalTransaction) command;
WriteTransactionId(info.TransactionId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
dataOut.Write(info.Type);
dataOut.Write(info.WasPrepared);

View File

@ -30,7 +30,7 @@ namespace OpenWire.Core.IO
LocalTransactionId info = (LocalTransactionId) command;
info.TransactionId = dataIn.ReadInt64();
info.ConnectionId = ReadConnectionId(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
}
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
LocalTransactionId info = (LocalTransactionId) command;
dataOut.Write(info.TransactionId);
WriteConnectionId(info.ConnectionId, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
}
}

View File

@ -30,11 +30,11 @@ namespace OpenWire.Core.IO
MessageAck info = (MessageAck) command;
info.Destination = ReadDestination(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.ConsumerId = ReadConsumerId(dataIn);
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
info.AckType = dataIn.ReadByte();
info.FirstMessageId = ReadMessageId(dataIn);
info.LastMessageId = ReadMessageId(dataIn);
info.FirstMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
info.LastMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
info.MessageCount = dataIn.ReadInt32();
}
@ -44,11 +44,11 @@ namespace OpenWire.Core.IO
MessageAck info = (MessageAck) command;
WriteDestination(info.Destination, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
WriteConsumerId(info.ConsumerId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
dataOut.Write(info.AckType);
WriteMessageId(info.FirstMessageId, dataOut);
WriteMessageId(info.LastMessageId, dataOut);
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId, dataOut);
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.LastMessageId, dataOut);
dataOut.Write(info.MessageCount);
}

View File

@ -29,9 +29,9 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
MessageDispatch info = (MessageDispatch) command;
info.ConsumerId = ReadConsumerId(dataIn);
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
info.Destination = ReadDestination(dataIn);
info.Message = ReadMessage(dataIn);
info.Message = (Message) CommandMarshallerRegistry.MessageMarshaller.ReadCommand(dataIn);
info.RedeliveryCounter = dataIn.ReadInt32();
}
@ -40,9 +40,9 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
MessageDispatch info = (MessageDispatch) command;
WriteConsumerId(info.ConsumerId, dataOut);
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
WriteDestination(info.Destination, dataOut);
WriteMessage(info.Message, dataOut);
CommandMarshallerRegistry.MessageMarshaller.WriteCommand(info.Message, dataOut);
dataOut.Write(info.RedeliveryCounter);
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
MessageId info = (MessageId) command;
info.ProducerId = ReadProducerId(dataIn);
info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
info.ProducerSequenceId = dataIn.ReadInt64();
info.BrokerSequenceId = dataIn.ReadInt64();
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
MessageId info = (MessageId) command;
WriteProducerId(info.ProducerId, dataOut);
CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut);
dataOut.Write(info.ProducerSequenceId);
dataOut.Write(info.BrokerSequenceId);

View File

@ -29,12 +29,12 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
Message info = (Message) command;
info.ProducerId = ReadProducerId(dataIn);
info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
info.Destination = ReadDestination(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
info.OriginalDestination = ReadDestination(dataIn);
info.MessageId = ReadMessageId(dataIn);
info.OriginalTransactionId = ReadTransactionId(dataIn);
info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
info.GroupID = dataIn.ReadString();
info.GroupSequence = dataIn.ReadInt32();
info.CorrelationId = dataIn.ReadString();
@ -44,10 +44,10 @@ namespace OpenWire.Core.IO
info.ReplyTo = ReadDestination(dataIn);
info.Timestamp = dataIn.ReadInt64();
info.Type = dataIn.ReadString();
info.Content = ReadByteSequence(dataIn);
info.MarshalledProperties = ReadByteSequence(dataIn);
info.DataStructure = ReadDataStructure(dataIn);
info.TargetConsumerId = ReadConsumerId(dataIn);
info.Content = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
info.MarshalledProperties = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
info.DataStructure = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
info.TargetConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
info.Compressed = dataIn.ReadBoolean();
info.RedeliveryCounter = dataIn.ReadInt32();
info.BrokerPath = ReadBrokerIds(dataIn);
@ -61,12 +61,12 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
Message info = (Message) command;
WriteProducerId(info.ProducerId, dataOut);
CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut);
WriteDestination(info.Destination, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
WriteDestination(info.OriginalDestination, dataOut);
WriteMessageId(info.MessageId, dataOut);
WriteTransactionId(info.OriginalTransactionId, dataOut);
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.OriginalTransactionId, dataOut);
dataOut.Write(info.GroupID);
dataOut.Write(info.GroupSequence);
dataOut.Write(info.CorrelationId);
@ -76,13 +76,13 @@ namespace OpenWire.Core.IO
WriteDestination(info.ReplyTo, dataOut);
dataOut.Write(info.Timestamp);
dataOut.Write(info.Type);
WriteByteSequence(info.Content, dataOut);
WriteByteSequence(info.MarshalledProperties, dataOut);
WriteDataStructure(info.DataStructure, dataOut);
WriteConsumerId(info.TargetConsumerId, dataOut);
CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.Content, dataOut);
CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.MarshalledProperties, dataOut);
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.DataStructure, dataOut);
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.TargetConsumerId, dataOut);
dataOut.Write(info.Compressed);
dataOut.Write(info.RedeliveryCounter);
dataOut.WriteBrokerIds(info.BrokerPath);
WriteBrokerIds(info.BrokerPath, dataOut);
dataOut.Write(info.Arrival);
dataOut.Write(info.UserID);
dataOut.Write(info.RecievedByDFBridge);

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
ProducerInfo info = (ProducerInfo) command;
info.ProducerId = ReadProducerId(dataIn);
info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
info.Destination = ReadDestination(dataIn);
info.BrokerPath = ReadBrokerIds(dataIn);
@ -39,9 +39,9 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
ProducerInfo info = (ProducerInfo) command;
WriteProducerId(info.ProducerId, dataOut);
CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut);
WriteDestination(info.Destination, dataOut);
dataOut.WriteBrokerIds(info.BrokerPath);
WriteBrokerIds(info.BrokerPath, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
RemoveInfo info = (RemoveInfo) command;
info.ObjectId = ReadDataStructure(dataIn);
info.ObjectId = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
}
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
RemoveInfo info = (RemoveInfo) command;
WriteDataStructure(info.ObjectId, dataOut);
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.ObjectId, dataOut);
}
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command;
info.ConnectionId = ReadConnectionId(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
info.SubcriptionName = dataIn.ReadString();
info.ClientId = dataIn.ReadString();
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
RemoveSubscriptionInfo info = (RemoveSubscriptionInfo) command;
WriteConnectionId(info.ConnectionId, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
dataOut.Write(info.SubcriptionName);
dataOut.Write(info.ClientId);

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
SessionInfo info = (SessionInfo) command;
info.SessionId = ReadSessionId(dataIn);
info.SessionId = (SessionId) CommandMarshallerRegistry.SessionIdMarshaller.ReadCommand(dataIn);
}
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
SessionInfo info = (SessionInfo) command;
WriteSessionId(info.SessionId, dataOut);
CommandMarshallerRegistry.SessionIdMarshaller.WriteCommand(info.SessionId, dataOut);
}
}

View File

@ -29,8 +29,8 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
TransactionInfo info = (TransactionInfo) command;
info.ConnectionId = ReadConnectionId(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
info.Type = dataIn.ReadByte();
}
@ -39,8 +39,8 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
TransactionInfo info = (TransactionInfo) command;
WriteConnectionId(info.ConnectionId, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
dataOut.Write(info.Type);
}

View File

@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
base.BuildCommand(command, dataIn);
WireFormatInfo info = (WireFormatInfo) command;
info.Magic = Readbyte[](dataIn);
info.Magic = ReadBytes(dataIn);
info.Version = dataIn.ReadInt32();
info.Options = dataIn.ReadInt32();
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
base.WriteCommand(command, dataOut);
WireFormatInfo info = (WireFormatInfo) command;
Writebyte[](info.Magic, dataOut);
WriteBytes(info.Magic, dataOut);
dataOut.Write(info.Version);
dataOut.Write(info.Options);

View File

@ -30,8 +30,8 @@ namespace OpenWire.Core.IO
XATransactionId info = (XATransactionId) command;
info.FormatId = dataIn.ReadInt32();
info.GlobalTransactionId = Readbyte[](dataIn);
info.BranchQualifier = Readbyte[](dataIn);
info.GlobalTransactionId = ReadBytes(dataIn);
info.BranchQualifier = ReadBytes(dataIn);
}
@ -40,8 +40,8 @@ namespace OpenWire.Core.IO
XATransactionId info = (XATransactionId) command;
dataOut.Write(info.FormatId);
Writebyte[](info.GlobalTransactionId, dataOut);
Writebyte[](info.BranchQualifier, dataOut);
WriteBytes(info.GlobalTransactionId, dataOut);
WriteBytes(info.BranchQualifier, dataOut);
}
}