latest generated OpenWire.Net code; getting closer :)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@366552 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-01-06 19:20:21 +00:00
parent 034949a481
commit 40280b7d31
53 changed files with 386 additions and 290 deletions

View File

@ -19,6 +19,16 @@ namespace OpenWire.Core
{
}
protected virtual BrokerId ReadBrokerId(BinaryReader dataIn)
{
return brokerIDMarshaller.ReadCommand();
}
protected virtual void WriteBrokerId(BrokerId command, BinaryWriter dataOut)
{
brokerIDMarshaller.WriteCommand(command, dataOut);
}
}
}

View File

@ -1,11 +1,12 @@
using System;
using OpenWire.Core.Commands;
namespace OpenWire.Core
{
/// <summary>
/// Summary description for ActiveMQDestination.
/// Summary description for Destination.
/// </summary>
public abstract class ActiveMQDestination {
public abstract class Destination {
/**
* Topic Destination object
@ -70,16 +71,16 @@ namespace OpenWire.Core
/**
* The Default Constructor
*/
protected ActiveMQDestination() {
protected Destination() {
}
/**
* Construct the ActiveMQDestination with a defined physical name;
* Construct the Destination with a defined physical name;
*
* @param name
*/
protected ActiveMQDestination(String name) {
protected Destination(String name) {
this.physicalName = name;
this.advisory = name != null && name.StartsWith(ADVISORY_PREFIX);
}
@ -103,21 +104,21 @@ namespace OpenWire.Core
* @return true if this is a destination for Consumer advisories
*/
public bool IsConsumerAdvisory(){
return IsAdvisory() && physicalName.StartsWith(ActiveMQDestination.CONSUMER_ADVISORY_PREFIX);
return IsAdvisory() && physicalName.StartsWith(Destination.CONSUMER_ADVISORY_PREFIX);
}
/**
* @return true if this is a destination for Producer advisories
*/
public bool IsProducerAdvisory(){
return IsAdvisory() && physicalName.StartsWith(ActiveMQDestination.PRODUCER_ADVISORY_PREFIX);
return IsAdvisory() && physicalName.StartsWith(Destination.PRODUCER_ADVISORY_PREFIX);
}
/**
* @return true if this is a destination for Connection advisories
*/
public bool IsConnectionAdvisory(){
return IsAdvisory() && physicalName.StartsWith(ActiveMQDestination.CONNECTION_ADVISORY_PREFIX);
return IsAdvisory() && physicalName.StartsWith(Destination.CONNECTION_ADVISORY_PREFIX);
}
/**

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller
{
public override Command CreateCommand() {
return new ActiveMQBytesMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQBytesMessage info = (ActiveMQBytesMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQBytesMessage info = (ActiveMQBytesMessage) command;
}
}

View File

@ -17,24 +17,23 @@ using OpenWire.Core.IO;
namespace OpenWire.Core.IO
{
public class ActiveMQDestinationMarshaller : AbstractCommandMarshaller
public abstract class ActiveMQDestinationMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQDestination();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQDestination info = (ActiveMQDestination) command;
info.setPhysicalName(dataIn.readUTF());
info.PhysicalName = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQDestination info = (ActiveMQDestination) command;
writeUTF(info.getPhysicalName(), dataOut);
dataOut.Write(info.PhysicalName);
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller
{
public override Command CreateCommand() {
return new ActiveMQMapMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQMapMessage info = (ActiveMQMapMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQMapMessage info = (ActiveMQMapMessage) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQMessageMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQMessage info = (ActiveMQMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQMessage info = (ActiveMQMessage) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller
{
public override Command CreateCommand() {
return new ActiveMQObjectMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQObjectMessage info = (ActiveMQObjectMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQObjectMessage info = (ActiveMQObjectMessage) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQQueueMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQQueue();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQQueue info = (ActiveMQQueue) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQQueue info = (ActiveMQQueue) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller
{
public override Command CreateCommand() {
return new ActiveMQStreamMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQStreamMessage info = (ActiveMQStreamMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQStreamMessage info = (ActiveMQStreamMessage) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQTempDestination();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQTempDestination info = (ActiveMQTempDestination) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQTempDestination info = (ActiveMQTempDestination) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQTempQueueMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQTempQueue();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQTempQueue info = (ActiveMQTempQueue) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQTempQueue info = (ActiveMQTempQueue) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQTempTopicMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQTempTopic();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQTempTopic info = (ActiveMQTempTopic) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQTempTopic info = (ActiveMQTempTopic) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller
{
public override Command CreateCommand() {
return new ActiveMQTextMessage();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQTextMessage info = (ActiveMQTextMessage) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQTextMessage info = (ActiveMQTextMessage) command;
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ActiveMQTopicMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ActiveMQTopic();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ActiveMQTopic info = (ActiveMQTopic) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ActiveMQTopic info = (ActiveMQTopic) command;
}
}

View File

@ -20,23 +20,26 @@ namespace OpenWire.Core.IO
public class BaseCommandMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new BaseCommand();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
BaseCommand info = (BaseCommand) command;
info.setCommandId(dataIn.readShort());
info.setResponseRequired(dataIn.readBoolean());
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.writeShort(info.getCommandId());
dataOut.writeBoolean(info.isResponseRequired());
dataOut.Write(info.CommandId);
dataOut.Write(info.ResponseRequired);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setBrokerId(dataIn.readUTF());
info.BrokerIdValue = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
BrokerId info = (BrokerId) command;
writeUTF(info.getBrokerId(), dataOut);
dataOut.Write(info.BrokerIdValue);
}
}

View File

@ -20,27 +20,30 @@ namespace OpenWire.Core.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.setBrokerId((org.apache.activemq.command.BrokerId) readObject(dataIn));
info.setBrokerURL(dataIn.readUTF());
info.setPeerBrokerInfos((org.apache.activemq.command.BrokerInfo[]) readObject(dataIn));
info.setBrokerName(dataIn.readUTF());
info.BrokerId = ReadBrokerId(dataIn);
info.BrokerURL = dataIn.ReadString();
info.PeerBrokerInfos = ReadBrokerInfo[](dataIn);
info.BrokerName = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
BrokerInfo info = (BrokerInfo) command;
writeObject(info.getBrokerId(), dataOut);
writeUTF(info.getBrokerURL(), dataOut);
writeObject(info.getPeerBrokerInfos(), dataOut);
writeUTF(info.getBrokerName(), dataOut);
WriteBrokerId(info.BrokerId, dataOut);
dataOut.Write(info.BrokerURL);
WriteBrokerInfo[](info.PeerBrokerInfos, dataOut);
dataOut.Write(info.BrokerName);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setConnectionId(dataIn.readUTF());
info.ConnectionIdValue = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ConnectionId info = (ConnectionId) command;
writeUTF(info.getConnectionId(), dataOut);
dataOut.Write(info.ConnectionIdValue);
}
}

View File

@ -20,29 +20,32 @@ namespace OpenWire.Core.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.setConnectionId((org.apache.activemq.command.ConnectionId) readObject(dataIn));
info.setClientId(dataIn.readUTF());
info.setPassword(dataIn.readUTF());
info.setUserName(dataIn.readUTF());
info.setBrokerPath((org.apache.activemq.command.BrokerId[]) readObject(dataIn));
info.ConnectionId = ReadConnectionId(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;
writeObject(info.getConnectionId(), dataOut);
writeUTF(info.getClientId(), dataOut);
writeUTF(info.getPassword(), dataOut);
writeUTF(info.getUserName(), dataOut);
writeObject(info.getBrokerPath(), dataOut);
WriteConnectionId(info.ConnectionId, dataOut);
dataOut.Write(info.ClientId);
dataOut.Write(info.Password);
dataOut.Write(info.UserName);
dataOut.WriteBrokerIds(info.BrokerPath);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setConnectionId(dataIn.readUTF());
info.setSessionId(dataIn.readLong());
info.setConsumerId(dataIn.readLong());
info.ConnectionId = dataIn.ReadString();
info.SessionId = dataIn.ReadInt64();
info.ConsumerIdValue = dataIn.ReadInt64();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ConsumerId info = (ConsumerId) command;
writeUTF(info.getConnectionId(), dataOut);
dataOut.writeLong(info.getSessionId());
dataOut.writeLong(info.getConsumerId());
dataOut.Write(info.ConnectionId);
dataOut.Write(info.SessionId);
dataOut.Write(info.ConsumerIdValue);
}
}

View File

@ -20,45 +20,48 @@ namespace OpenWire.Core.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.setConsumerId((org.apache.activemq.command.ConsumerId) readObject(dataIn));
info.setBrowser(dataIn.readBoolean());
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setPrefetchSize(dataIn.readInt());
info.setDispatchAsync(dataIn.readBoolean());
info.setSelector(dataIn.readUTF());
info.setSubcriptionName(dataIn.readUTF());
info.setNoLocal(dataIn.readBoolean());
info.setExclusive(dataIn.readBoolean());
info.setRetroactive(dataIn.readBoolean());
info.setPriority(dataIn.readByte());
info.setBrokerPath((org.apache.activemq.command.BrokerId[]) readObject(dataIn));
info.setNetworkSubscription(dataIn.readBoolean());
info.ConsumerId = ReadConsumerId(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;
writeObject(info.getConsumerId(), dataOut);
dataOut.writeBoolean(info.isBrowser());
writeObject(info.getDestination(), dataOut);
dataOut.writeInt(info.getPrefetchSize());
dataOut.writeBoolean(info.isDispatchAsync());
writeUTF(info.getSelector(), dataOut);
writeUTF(info.getSubcriptionName(), dataOut);
dataOut.writeBoolean(info.isNoLocal());
dataOut.writeBoolean(info.isExclusive());
dataOut.writeBoolean(info.isRetroactive());
dataOut.writeByte(info.getPriority());
writeObject(info.getBrokerPath(), dataOut);
dataOut.writeBoolean(info.isNetworkSubscription());
WriteConsumerId(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);
dataOut.WriteBrokerIds(info.BrokerPath);
dataOut.Write(info.NetworkSubscription);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setCommand(dataIn.readUTF());
info.Command = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ControlCommand info = (ControlCommand) command;
writeUTF(info.getCommand(), dataOut);
dataOut.Write(info.Command);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setData((org.apache.activemq.command.DataStructure[]) readObject(dataIn));
info.Data = ReadDataStructure[](dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
DataArrayResponse info = (DataArrayResponse) command;
writeObject(info.getData(), dataOut);
WriteDataStructure[](info.Data, dataOut);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setData((org.apache.activemq.command.DataStructure) readObject(dataIn));
info.Data = ReadDataStructure(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
DataResponse info = (DataResponse) command;
writeObject(info.getData(), dataOut);
WriteDataStructure(info.Data, dataOut);
}
}

View File

@ -20,29 +20,32 @@ namespace OpenWire.Core.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.setConnectionId((org.apache.activemq.command.ConnectionId) readObject(dataIn));
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setOperationType(dataIn.readByte());
info.setTimeout(dataIn.readLong());
info.setBrokerPath((org.apache.activemq.command.BrokerId[]) readObject(dataIn));
info.ConnectionId = ReadConnectionId(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;
writeObject(info.getConnectionId(), dataOut);
writeObject(info.getDestination(), dataOut);
dataOut.writeByte(info.getOperationType());
dataOut.writeLong(info.getTimeout());
writeObject(info.getBrokerPath(), dataOut);
WriteConnectionId(info.ConnectionId, dataOut);
WriteDestination(info.Destination, dataOut);
dataOut.Write(info.OperationType);
dataOut.Write(info.Timeout);
dataOut.WriteBrokerIds(info.BrokerPath);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setException((java.lang.Throwable) readObject(dataIn));
info.Exception = ReadThrowable(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ExceptionResponse info = (ExceptionResponse) command;
writeObject(info.getException(), dataOut);
WriteThrowable(info.Exception, dataOut);
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class FlushCommandMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new FlushCommand();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
FlushCommand info = (FlushCommand) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
FlushCommand info = (FlushCommand) command;
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setResult(dataIn.readInt());
info.Result = dataIn.ReadInt32();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
IntegerResponse info = (IntegerResponse) command;
dataOut.writeInt(info.getResult());
dataOut.Write(info.Result);
}
}

View File

@ -20,23 +20,26 @@ namespace OpenWire.Core.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.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setMessageAck((org.apache.activemq.command.MessageAck) readObject(dataIn));
info.Destination = ReadDestination(dataIn);
info.MessageAck = ReadMessageAck(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
JournalQueueAck info = (JournalQueueAck) command;
writeObject(info.getDestination(), dataOut);
writeObject(info.getMessageAck(), dataOut);
WriteDestination(info.Destination, dataOut);
WriteMessageAck(info.MessageAck, dataOut);
}
}

View File

@ -20,31 +20,34 @@ namespace OpenWire.Core.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.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setMessageId((org.apache.activemq.command.MessageId) readObject(dataIn));
info.setMessageSequenceId(dataIn.readLong());
info.setSubscritionName(dataIn.readUTF());
info.setClientId(dataIn.readUTF());
info.setTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.Destination = ReadDestination(dataIn);
info.MessageId = ReadMessageId(dataIn);
info.MessageSequenceId = dataIn.ReadInt64();
info.SubscritionName = dataIn.ReadString();
info.ClientId = dataIn.ReadString();
info.TransactionId = ReadTransactionId(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
JournalTopicAck info = (JournalTopicAck) command;
writeObject(info.getDestination(), dataOut);
writeObject(info.getMessageId(), dataOut);
dataOut.writeLong(info.getMessageSequenceId());
writeUTF(info.getSubscritionName(), dataOut);
writeUTF(info.getClientId(), dataOut);
writeObject(info.getTransactionId(), dataOut);
WriteDestination(info.Destination, dataOut);
WriteMessageId(info.MessageId, dataOut);
dataOut.Write(info.MessageSequenceId);
dataOut.Write(info.SubscritionName);
dataOut.Write(info.ClientId);
WriteTransactionId(info.TransactionId, dataOut);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setMessage(dataIn.readUTF());
info.Message = dataIn.ReadString();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
JournalTrace info = (JournalTrace) command;
writeUTF(info.getMessage(), dataOut);
dataOut.Write(info.Message);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.setType(dataIn.readByte());
info.setWasPrepared(dataIn.readBoolean());
info.TransactionId = ReadTransactionId(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;
writeObject(info.getTransactionId(), dataOut);
dataOut.writeByte(info.getType());
dataOut.writeBoolean(info.getWasPrepared());
WriteTransactionId(info.TransactionId, dataOut);
dataOut.Write(info.Type);
dataOut.Write(info.WasPrepared);
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class KeepAliveInfoMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new KeepAliveInfo();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
KeepAliveInfo info = (KeepAliveInfo) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
KeepAliveInfo info = (KeepAliveInfo) command;
}
}

View File

@ -20,23 +20,26 @@ namespace OpenWire.Core.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.setTransactionId(dataIn.readLong());
info.setConnectionId((org.apache.activemq.command.ConnectionId) readObject(dataIn));
info.TransactionId = dataIn.ReadInt64();
info.ConnectionId = ReadConnectionId(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
LocalTransactionId info = (LocalTransactionId) command;
dataOut.writeLong(info.getTransactionId());
writeObject(info.getConnectionId(), dataOut);
dataOut.Write(info.TransactionId);
WriteConnectionId(info.ConnectionId, dataOut);
}
}

View File

@ -20,33 +20,36 @@ namespace OpenWire.Core.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.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.setConsumerId((org.apache.activemq.command.ConsumerId) readObject(dataIn));
info.setAckType(dataIn.readByte());
info.setFirstMessageId((org.apache.activemq.command.MessageId) readObject(dataIn));
info.setLastMessageId((org.apache.activemq.command.MessageId) readObject(dataIn));
info.setMessageCount(dataIn.readInt());
info.Destination = ReadDestination(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.ConsumerId = ReadConsumerId(dataIn);
info.AckType = dataIn.ReadByte();
info.FirstMessageId = ReadMessageId(dataIn);
info.LastMessageId = ReadMessageId(dataIn);
info.MessageCount = dataIn.ReadInt32();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
MessageAck info = (MessageAck) command;
writeObject(info.getDestination(), dataOut);
writeObject(info.getTransactionId(), dataOut);
writeObject(info.getConsumerId(), dataOut);
dataOut.writeByte(info.getAckType());
writeObject(info.getFirstMessageId(), dataOut);
writeObject(info.getLastMessageId(), dataOut);
dataOut.writeInt(info.getMessageCount());
WriteDestination(info.Destination, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
WriteConsumerId(info.ConsumerId, dataOut);
dataOut.Write(info.AckType);
WriteMessageId(info.FirstMessageId, dataOut);
WriteMessageId(info.LastMessageId, dataOut);
dataOut.Write(info.MessageCount);
}
}

View File

@ -20,27 +20,30 @@ namespace OpenWire.Core.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.setConsumerId((org.apache.activemq.command.ConsumerId) readObject(dataIn));
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setMessage((org.apache.activemq.command.Message) readObject(dataIn));
info.setRedeliveryCounter(dataIn.readInt());
info.ConsumerId = ReadConsumerId(dataIn);
info.Destination = ReadDestination(dataIn);
info.Message = ReadMessage(dataIn);
info.RedeliveryCounter = dataIn.ReadInt32();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
MessageDispatch info = (MessageDispatch) command;
writeObject(info.getConsumerId(), dataOut);
writeObject(info.getDestination(), dataOut);
writeObject(info.getMessage(), dataOut);
dataOut.writeInt(info.getRedeliveryCounter());
WriteConsumerId(info.ConsumerId, dataOut);
WriteDestination(info.Destination, dataOut);
WriteMessage(info.Message, dataOut);
dataOut.Write(info.RedeliveryCounter);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setProducerId((org.apache.activemq.command.ProducerId) readObject(dataIn));
info.setProducerSequenceId(dataIn.readLong());
info.setBrokerSequenceId(dataIn.readLong());
info.ProducerId = ReadProducerId(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;
writeObject(info.getProducerId(), dataOut);
dataOut.writeLong(info.getProducerSequenceId());
dataOut.writeLong(info.getBrokerSequenceId());
WriteProducerId(info.ProducerId, dataOut);
dataOut.Write(info.ProducerSequenceId);
dataOut.Write(info.BrokerSequenceId);
}
}

View File

@ -20,69 +20,72 @@ namespace OpenWire.Core.IO
public class MessageMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new Message();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
Message info = (Message) command;
info.setProducerId((org.apache.activemq.command.ProducerId) readObject(dataIn));
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.setOriginalDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setMessageId((org.apache.activemq.command.MessageId) readObject(dataIn));
info.setOriginalTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.setGroupID(dataIn.readUTF());
info.setGroupSequence(dataIn.readInt());
info.setCorrelationId(dataIn.readUTF());
info.setPersistent(dataIn.readBoolean());
info.setExpiration(dataIn.readLong());
info.setPriority(dataIn.readByte());
info.setReplyTo((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setTimestamp(dataIn.readLong());
info.setType(dataIn.readUTF());
info.setContent((org.activeio.ByteSequence) readObject(dataIn));
info.setMarshalledProperties((org.activeio.ByteSequence) readObject(dataIn));
info.setDataStructure((org.apache.activemq.command.DataStructure) readObject(dataIn));
info.setTargetConsumerId((org.apache.activemq.command.ConsumerId) readObject(dataIn));
info.setCompressed(dataIn.readBoolean());
info.setRedeliveryCounter(dataIn.readInt());
info.setBrokerPath((org.apache.activemq.command.BrokerId[]) readObject(dataIn));
info.setArrival(dataIn.readLong());
info.setUserID(dataIn.readUTF());
info.setRecievedByDFBridge(dataIn.readBoolean());
info.ProducerId = ReadProducerId(dataIn);
info.Destination = ReadDestination(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.OriginalDestination = ReadDestination(dataIn);
info.MessageId = ReadMessageId(dataIn);
info.OriginalTransactionId = ReadTransactionId(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 = ReadByteSequence(dataIn);
info.MarshalledProperties = ReadByteSequence(dataIn);
info.DataStructure = ReadDataStructure(dataIn);
info.TargetConsumerId = ReadConsumerId(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;
writeObject(info.getProducerId(), dataOut);
writeObject(info.getDestination(), dataOut);
writeObject(info.getTransactionId(), dataOut);
writeObject(info.getOriginalDestination(), dataOut);
writeObject(info.getMessageId(), dataOut);
writeObject(info.getOriginalTransactionId(), dataOut);
writeUTF(info.getGroupID(), dataOut);
dataOut.writeInt(info.getGroupSequence());
writeUTF(info.getCorrelationId(), dataOut);
dataOut.writeBoolean(info.isPersistent());
dataOut.writeLong(info.getExpiration());
dataOut.writeByte(info.getPriority());
writeObject(info.getReplyTo(), dataOut);
dataOut.writeLong(info.getTimestamp());
writeUTF(info.getType(), dataOut);
writeObject(info.getContent(), dataOut);
writeObject(info.getMarshalledProperties(), dataOut);
writeObject(info.getDataStructure(), dataOut);
writeObject(info.getTargetConsumerId(), dataOut);
dataOut.writeBoolean(info.isCompressed());
dataOut.writeInt(info.getRedeliveryCounter());
writeObject(info.getBrokerPath(), dataOut);
dataOut.writeLong(info.getArrival());
writeUTF(info.getUserID(), dataOut);
dataOut.writeBoolean(info.isRecievedByDFBridge());
WriteProducerId(info.ProducerId, dataOut);
WriteDestination(info.Destination, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
WriteDestination(info.OriginalDestination, dataOut);
WriteMessageId(info.MessageId, dataOut);
WriteTransactionId(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);
WriteByteSequence(info.Content, dataOut);
WriteByteSequence(info.MarshalledProperties, dataOut);
WriteDataStructure(info.DataStructure, dataOut);
WriteConsumerId(info.TargetConsumerId, dataOut);
dataOut.Write(info.Compressed);
dataOut.Write(info.RedeliveryCounter);
dataOut.WriteBrokerIds(info.BrokerPath);
dataOut.Write(info.Arrival);
dataOut.Write(info.UserID);
dataOut.Write(info.RecievedByDFBridge);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setConnectionId(dataIn.readUTF());
info.setProducerId(dataIn.readLong());
info.setSessionId(dataIn.readLong());
info.ConnectionId = dataIn.ReadString();
info.ProducerIdValue = dataIn.ReadInt64();
info.SessionId = dataIn.ReadInt64();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ProducerId info = (ProducerId) command;
writeUTF(info.getConnectionId(), dataOut);
dataOut.writeLong(info.getProducerId());
dataOut.writeLong(info.getSessionId());
dataOut.Write(info.ConnectionId);
dataOut.Write(info.ProducerIdValue);
dataOut.Write(info.SessionId);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setProducerId((org.apache.activemq.command.ProducerId) readObject(dataIn));
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setBrokerPath((org.apache.activemq.command.BrokerId[]) readObject(dataIn));
info.ProducerId = ReadProducerId(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;
writeObject(info.getProducerId(), dataOut);
writeObject(info.getDestination(), dataOut);
writeObject(info.getBrokerPath(), dataOut);
WriteProducerId(info.ProducerId, dataOut);
WriteDestination(info.Destination, dataOut);
dataOut.WriteBrokerIds(info.BrokerPath);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setObjectId((org.apache.activemq.command.DataStructure) readObject(dataIn));
info.ObjectId = ReadDataStructure(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
RemoveInfo info = (RemoveInfo) command;
writeObject(info.getObjectId(), dataOut);
WriteDataStructure(info.ObjectId, dataOut);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setConnectionId((org.apache.activemq.command.ConnectionId) readObject(dataIn));
info.setSubcriptionName(dataIn.readUTF());
info.setClientId(dataIn.readUTF());
info.ConnectionId = ReadConnectionId(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;
writeObject(info.getConnectionId(), dataOut);
writeUTF(info.getSubcriptionName(), dataOut);
writeUTF(info.getClientId(), dataOut);
WriteConnectionId(info.ConnectionId, dataOut);
dataOut.Write(info.SubcriptionName);
dataOut.Write(info.ClientId);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setCorrelationId(dataIn.readShort());
info.CorrelationId = dataIn.ReadInt16();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
Response info = (Response) command;
dataOut.writeShort(info.getCorrelationId());
dataOut.Write(info.CorrelationId);
}
}

View File

@ -20,23 +20,26 @@ namespace OpenWire.Core.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.setConnectionId(dataIn.readUTF());
info.setSessionId(dataIn.readLong());
info.ConnectionId = dataIn.ReadString();
info.SessionIdValue = dataIn.ReadInt64();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
SessionId info = (SessionId) command;
writeUTF(info.getConnectionId(), dataOut);
dataOut.writeLong(info.getSessionId());
dataOut.Write(info.ConnectionId);
dataOut.Write(info.SessionIdValue);
}
}

View File

@ -20,21 +20,24 @@ namespace OpenWire.Core.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.setSessionId((org.apache.activemq.command.SessionId) readObject(dataIn));
info.SessionId = ReadSessionId(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
SessionInfo info = (SessionInfo) command;
writeObject(info.getSessionId(), dataOut);
WriteSessionId(info.SessionId, dataOut);
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class ShutdownInfoMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new ShutdownInfo();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
ShutdownInfo info = (ShutdownInfo) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ShutdownInfo info = (ShutdownInfo) command;
}
}

View File

@ -20,27 +20,30 @@ namespace OpenWire.Core.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.setClientId(dataIn.readUTF());
info.setDestination((org.apache.activemq.command.ActiveMQDestination) readObject(dataIn));
info.setSelector(dataIn.readUTF());
info.setSubcriptionName(dataIn.readUTF());
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;
writeUTF(info.getClientId(), dataOut);
writeObject(info.getDestination(), dataOut);
writeUTF(info.getSelector(), dataOut);
writeUTF(info.getSubcriptionName(), dataOut);
dataOut.Write(info.ClientId);
WriteDestination(info.Destination, dataOut);
dataOut.Write(info.Selector);
dataOut.Write(info.SubcriptionName);
}
}

View File

@ -20,19 +20,18 @@ namespace OpenWire.Core.IO
public class TransactionIdMarshaller : AbstractCommandMarshaller
{
public override Command CreateCommand() {
return new TransactionId();
}
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
TransactionId info = (TransactionId) command;
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
TransactionId info = (TransactionId) command;
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setConnectionId((org.apache.activemq.command.ConnectionId) readObject(dataIn));
info.setTransactionId((org.apache.activemq.command.TransactionId) readObject(dataIn));
info.setType(dataIn.readByte());
info.ConnectionId = ReadConnectionId(dataIn);
info.TransactionId = ReadTransactionId(dataIn);
info.Type = dataIn.ReadByte();
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
TransactionInfo info = (TransactionInfo) command;
writeObject(info.getConnectionId(), dataOut);
writeObject(info.getTransactionId(), dataOut);
dataOut.writeByte(info.getType());
WriteConnectionId(info.ConnectionId, dataOut);
WriteTransactionId(info.TransactionId, dataOut);
dataOut.Write(info.Type);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setMagic((byte[]) readObject(dataIn));
info.setVersion(dataIn.readInt());
info.setOptions(dataIn.readInt());
info.Magic = Readbyte[](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;
writeObject(info.getMagic(), dataOut);
dataOut.writeInt(info.getVersion());
dataOut.writeInt(info.getOptions());
Writebyte[](info.Magic, dataOut);
dataOut.Write(info.Version);
dataOut.Write(info.Options);
}
}

View File

@ -20,25 +20,28 @@ namespace OpenWire.Core.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.setFormatId(dataIn.readInt());
info.setGlobalTransactionId((byte[]) readObject(dataIn));
info.setBranchQualifier((byte[]) readObject(dataIn));
info.FormatId = dataIn.ReadInt32();
info.GlobalTransactionId = Readbyte[](dataIn);
info.BranchQualifier = Readbyte[](dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
XATransactionId info = (XATransactionId) command;
dataOut.writeInt(info.getFormatId());
writeObject(info.getGlobalTransactionId(), dataOut);
writeObject(info.getBranchQualifier(), dataOut);
dataOut.Write(info.FormatId);
Writebyte[](info.GlobalTransactionId, dataOut);
Writebyte[](info.BranchQualifier, dataOut);
}
}

View File

@ -1,13 +1,14 @@
using System;
using OpenWire.Core.Commands;
namespace OpenWire.Core
{
/// <summary>
/// Summary description for ActiveMQQueue.
/// Summary description for Queue.
/// </summary>
public class ActiveMQQueue : ActiveMQDestination {
public ActiveMQQueue() : base(){}
public ActiveMQQueue(String name) : base(name){}
public class Queue : Destination {
public Queue() : base(){}
public Queue(String name) : base(name){}
public String GetQueueName() {
return base.GetPhysicalName();

View File

@ -1,14 +1,15 @@
using System;
using OpenWire.Core.Commands;
namespace OpenWire.Core
{
/// <summary>
/// Summary description for ActiveMQTopic.
/// Summary description for Topic.
/// </summary>
public class ActiveMQTopic : ActiveMQDestination
public class Topic : Destination
{
public ActiveMQTopic(): base() {}
public ActiveMQTopic(String name):base(name){}
public Topic(): base() {}
public Topic(String name):base(name){}
public String GetTopicName()
{