latest code generated code for C# which just about compiles now

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@379827 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-02-22 17:45:12 +00:00
parent 7e464aff59
commit 3d3c4679fd
111 changed files with 5780 additions and 3020 deletions

View File

@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ActiveMQBytesMessage;
}

View File

@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ActiveMQMapMessage;
}

View File

@ -5,7 +5,7 @@ using OpenWire.Client;
using OpenWire.Client.Core;
namespace OpenWire.Client.Commands {
public class ActiveMQMessage : Message, IMessage {
public class ActiveMQMessage : Message, IMessage, MarshallAware {
public const byte ID_ActiveMQMessage = 23;
public static ActiveMQMessage Transform(IMessage message) {
@ -16,20 +16,37 @@ namespace OpenWire.Client.Commands {
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
return ID_ActiveMQMessage;
public override byte GetDataStructureType() {
return ID_ActiveMQMessage;
}
public override bool IsMarshallAware() {
return true;
}
// Properties
public IDestination FromDestination {
get {
return Destination;
}
set {
this.Destination = ActiveMQDestination.Transform(value);
}
get { return Destination; }
set { this.Destination = ActiveMQDestination.Transform(value); }
}
}
public void BeforeMarshall(OpenWireFormat wireFormat) {
}
public void AfterMarshall(OpenWireFormat wireFormat) {
}
public void BeforeUnmarshall(OpenWireFormat wireFormat) {
}
public void AfterUnmarshall(OpenWireFormat wireFormat) {
}
public void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data) {
}
public byte[] GetMarshalledForm(OpenWireFormat wireFormat) {
return null;
}
}
}

View File

@ -1,3 +1,20 @@
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -6,19 +23,26 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ActiveMQObjectMessage : ActiveMQMessage
{
public const byte ID_ActiveMQObjectMessage = 26;
public const byte ID_ActiveMQObjectMessage = 26;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ActiveMQObjectMessage;
}

View File

@ -18,7 +18,7 @@ namespace OpenWire.Client.Commands
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ActiveMQStreamMessage;
}

View File

@ -0,0 +1,53 @@
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
using OpenWire.Client;
using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public abstract class ActiveMQTempDestination : ActiveMQDestination
{
public const byte ID_ActiveMQTempDestination = 0;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetDataStructureType() {
return ID_ActiveMQTempDestination;
}
// Properties
}
}

View File

@ -22,7 +22,7 @@ namespace OpenWire.Client.Commands {
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ActiveMQTextMessage;
}

View File

@ -29,21 +29,21 @@ namespace OpenWire.Client.Commands {
public override bool Equals(Object that) {
if (that is BaseCommand) {
BaseCommand thatCommand = (BaseCommand) that;
return this.GetCommandType() == thatCommand.GetCommandType()
return this.GetDataStructureType() == thatCommand.GetDataStructureType()
&& this.CommandId == thatCommand.CommandId;
}
return false;
}
public override String ToString() {
string answer = GetCommandTypeAsString(GetCommandType());
string answer = GetDataStructureTypeAsString(GetDataStructureType());
if (answer.Length == 0) {
answer = base.ToString();
}
return answer + ": id = " + CommandId;
}
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_BaseCommand;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class BrokerId : AbstractCommand
{
public const byte ID_BrokerId = 124;
public const byte ID_BrokerId = 124;
string value;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_BrokerId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,15 +23,23 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class BrokerInfo : BaseCommand
{
public const byte ID_BrokerInfo = 2;
public const byte ID_BrokerInfo = 2;
BrokerId brokerId;
string brokerURL;
BrokerInfo[] peerBrokerInfos;
string brokerName;
bool slaveBroker;
// TODO generate Equals method
@ -31,7 +47,7 @@ namespace OpenWire.Client.Commands
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_BrokerInfo;
}
@ -62,5 +78,11 @@ namespace OpenWire.Client.Commands
set { this.brokerName = value; }
}
public bool SlaveBroker
{
get { return slaveBroker; }
set { this.slaveBroker = value; }
}
}
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,21 +23,28 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ConnectionError : BaseCommand
{
public const byte ID_ConnectionError = 16;
public const byte ID_ConnectionError = 16;
BrokerError exception;
ConnectionId connectionId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ConnectionError;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ConnectionId : AbstractCommand
{
public const byte ID_ConnectionId = 120;
public const byte ID_ConnectionId = 120;
string value;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ConnectionId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ConnectionInfo : BaseCommand
{
public const byte ID_ConnectionInfo = 3;
public const byte ID_ConnectionInfo = 3;
ConnectionId connectionId;
string clientId;
@ -26,13 +42,12 @@ namespace OpenWire.Client.Commands
BrokerId[] brokerPath;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ConnectionInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ConsumerId : AbstractCommand
{
public const byte ID_ConsumerId = 122;
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() {
public override byte GetDataStructureType() {
return ID_ConsumerId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ConsumerInfo : BaseCommand
{
public const byte ID_ConsumerInfo = 5;
public const byte ID_ConsumerInfo = 5;
ConsumerId consumerId;
bool browser;
@ -34,13 +50,12 @@ namespace OpenWire.Client.Commands
bool networkSubscription;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ConsumerInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ControlCommand : BaseCommand
{
public const byte ID_ControlCommand = 14;
public const byte ID_ControlCommand = 14;
string command;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ControlCommand;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class DataArrayResponse : Response
{
public const byte ID_DataArrayResponse = 33;
public const byte ID_DataArrayResponse = 33;
DataStructure[] data;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_DataArrayResponse;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class DataResponse : Response
{
public const byte ID_DataResponse = 32;
public const byte ID_DataResponse = 32;
DataStructure data;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_DataResponse;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class DestinationInfo : BaseCommand
{
public const byte ID_DestinationInfo = 8;
public const byte ID_DestinationInfo = 8;
ConnectionId connectionId;
ActiveMQDestination destination;
@ -26,13 +42,12 @@ namespace OpenWire.Client.Commands
BrokerId[] brokerPath;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_DestinationInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,21 +23,28 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class DiscoveryEvent : AbstractCommand
{
public const byte ID_DiscoveryEvent = 40;
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() {
public override byte GetDataStructureType() {
return ID_DiscoveryEvent;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ExceptionResponse : Response
{
public const byte ID_ExceptionResponse = 31;
public const byte ID_ExceptionResponse = 31;
BrokerError exception;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ExceptionResponse;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,19 +23,26 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class FlushCommand : BaseCommand
{
public const byte ID_FlushCommand = 15;
public const byte ID_FlushCommand = 15;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_FlushCommand;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class IntegerResponse : Response
{
public const byte ID_IntegerResponse = 34;
public const byte ID_IntegerResponse = 34;
int result;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_IntegerResponse;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,21 +23,28 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
public class JournalQueueAck : AbstractCommand
//
// 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-core module
//
public class JournalQueueAck : DataStructureSupport
{
public const byte ID_JournalQueueAck = 52;
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() {
public override byte GetDataStructureType() {
return ID_JournalQueueAck;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
public class JournalTopicAck : AbstractCommand
//
// 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-core module
//
public class JournalTopicAck : DataStructureSupport
{
public const byte ID_JournalTopicAck = 50;
public const byte ID_JournalTopicAck = 50;
ActiveMQDestination destination;
MessageId messageId;
@ -27,13 +43,12 @@ namespace OpenWire.Client.Commands
TransactionId transactionId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_JournalTopicAck;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
public class JournalTrace : AbstractCommand
//
// 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-core module
//
public class JournalTrace : DataStructureSupport
{
public const byte ID_JournalTrace = 53;
public const byte ID_JournalTrace = 53;
string message;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_JournalTrace;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
public class JournalTransaction : AbstractCommand
//
// 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-core module
//
public class JournalTransaction : DataStructureSupport
{
public const byte ID_JournalTransaction = 54;
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() {
public override byte GetDataStructureType() {
return ID_JournalTransaction;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,19 +23,26 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
public class KeepAliveInfo : AbstractCommand
//
// 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-core module
//
public class KeepAliveInfo : DataStructureSupport
{
public const byte ID_KeepAliveInfo = 10;
public const byte ID_KeepAliveInfo = 10;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_KeepAliveInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,21 +23,28 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class LocalTransactionId : TransactionId
{
public const byte ID_LocalTransactionId = 111;
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() {
public override byte GetDataStructureType() {
return ID_LocalTransactionId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class Message : BaseCommand
{
public const byte ID_Message = 0;
public const byte ID_Message = 0;
ProducerId producerId;
ActiveMQDestination destination;
@ -46,13 +62,12 @@ namespace OpenWire.Client.Commands
bool recievedByDFBridge;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_Message;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class MessageAck : BaseCommand
{
public const byte ID_MessageAck = 22;
public const byte ID_MessageAck = 22;
ActiveMQDestination destination;
TransactionId transactionId;
@ -28,13 +44,12 @@ namespace OpenWire.Client.Commands
int messageCount;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_MessageAck;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class MessageDispatch : BaseCommand
{
public const byte ID_MessageDispatch = 21;
public const byte ID_MessageDispatch = 21;
ConsumerId consumerId;
ActiveMQDestination destination;
@ -25,13 +41,12 @@ namespace OpenWire.Client.Commands
int redeliveryCounter;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_MessageDispatch;
}

View File

@ -0,0 +1,81 @@
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
using OpenWire.Client;
using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// Marshalling code for Open Wire Format for MessageDispatchNotification
//
//
// NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the
// activemq-core module
//
public class MessageDispatchNotification : BaseCommand
{
public const byte ID_MessageDispatchNotification = 90;
ConsumerId consumerId;
ActiveMQDestination destination;
long deliverySequenceId;
MessageId messageId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetDataStructureType() {
return ID_MessageDispatchNotification;
}
// Properties
public ConsumerId ConsumerId
{
get { return consumerId; }
set { this.consumerId = value; }
}
public ActiveMQDestination Destination
{
get { return destination; }
set { this.destination = value; }
}
public long DeliverySequenceId
{
get { return deliverySequenceId; }
set { this.deliverySequenceId = value; }
}
public MessageId MessageId
{
get { return messageId; }
set { this.messageId = value; }
}
}
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class MessageId : AbstractCommand
{
public const byte ID_MessageId = 110;
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() {
public override byte GetDataStructureType() {
return ID_MessageId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ProducerId : AbstractCommand
{
public const byte ID_ProducerId = 123;
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() {
public override byte GetDataStructureType() {
return ID_ProducerId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ProducerInfo : BaseCommand
{
public const byte ID_ProducerInfo = 6;
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() {
public override byte GetDataStructureType() {
return ID_ProducerInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class RemoveInfo : BaseCommand
{
public const byte ID_RemoveInfo = 12;
public const byte ID_RemoveInfo = 12;
DataStructure objectId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_RemoveInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class RemoveSubscriptionInfo : BaseCommand
{
public const byte ID_RemoveSubscriptionInfo = 0;
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() {
public override byte GetDataStructureType() {
return ID_RemoveSubscriptionInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class Response : BaseCommand
{
public const byte ID_Response = 30;
public const byte ID_Response = 30;
short correlationId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_Response;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,21 +23,28 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class SessionId : AbstractCommand
{
public const byte ID_SessionId = 121;
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() {
public override byte GetDataStructureType() {
return ID_SessionId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,20 +23,27 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class SessionInfo : BaseCommand
{
public const byte ID_SessionInfo = 4;
public const byte ID_SessionInfo = 4;
SessionId sessionId;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_SessionInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,19 +23,26 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class ShutdownInfo : BaseCommand
{
public const byte ID_ShutdownInfo = 11;
public const byte ID_ShutdownInfo = 11;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_ShutdownInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,9 +23,17 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class SubscriptionInfo : AbstractCommand
{
public const byte ID_SubscriptionInfo = 55;
public const byte ID_SubscriptionInfo = 55;
string clientId;
ActiveMQDestination destination;
@ -25,13 +41,12 @@ namespace OpenWire.Client.Commands
string subcriptionName;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_SubscriptionInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,19 +23,26 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class TransactionId : AbstractCommand
{
public const byte ID_TransactionId = 0;
public const byte ID_TransactionId = 0;
// TODO generate Equals method
// TODO generate GetHashCode method
// TODO generate ToString method
public override byte GetCommandType() {
public override byte GetDataStructureType() {
return ID_TransactionId;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class TransactionInfo : BaseCommand
{
public const byte ID_TransactionInfo = 7;
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() {
public override byte GetDataStructureType() {
return ID_TransactionInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class WireFormatInfo : AbstractCommand
{
public const byte ID_WireFormatInfo = 1;
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() {
public override byte GetDataStructureType() {
return ID_WireFormatInfo;
}

View File

@ -1,11 +1,19 @@
//
// 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
//
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
using System;
using System.Collections;
@ -15,22 +23,29 @@ using OpenWire.Client.Core;
namespace OpenWire.Client.Commands
{
//
// 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-core module
//
public class XATransactionId : TransactionId
{
public const byte ID_XATransactionId = 112;
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() {
public override byte GetDataStructureType() {
return ID_XATransactionId;
}

View File

@ -12,11 +12,15 @@ namespace OpenWire.Client.Core {
protected AbstractCommand() {
}
public virtual byte GetCommandType() {
public virtual byte GetDataStructureType() {
return 0;
}
public static String GetCommandTypeAsString(int type) {
}
public virtual bool IsMarshallAware() {
return false;
}
public static String GetDataStructureTypeAsString(int type) {
String packetTypeStr = "";
switch (type) {
case ActiveMQMessage.ID_ActiveMQMessage :

View File

@ -1,117 +0,0 @@
using System;
using System.IO;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
using OpenWire.Client.IO;
namespace OpenWire.Client.Core {
/// <summary>
/// A base class with useful implementation inheritence methods
/// for creating marshallers of the OpenWire protocol
/// </summary>
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 BrokerError ReadBrokerError(BinaryReader dataIn) {
BrokerError answer = new BrokerError();
answer.ExceptionClass = dataIn.ReadString();
answer.StackTrace = dataIn.ReadString();
return answer;
}
protected virtual void WriteBrokerError(BrokerError command, BinaryWriter dataOut) {
dataOut.Write(command.ExceptionClass);
dataOut.Write(command.StackTrace);
}
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);
}
}
}

View File

@ -0,0 +1,93 @@
using System;
using System.IO;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
using OpenWire.Client.IO;
namespace OpenWire.Client.Core {
/// <summary>
/// Represents a stream of boolean flags
/// </summary>
public class BooleanStream {
byte[] data = new byte[48];
short arrayLimit;
short arrayPos;
byte bytePos;
public bool ReadBoolean() {
byte b = data[arrayPos];
bool rc = ((b >> bytePos) & 0x01) != 0;
bytePos++;
if (bytePos >= 8) {
bytePos = 0;
arrayPos++;
}
return rc;
}
public void WriteBoolean(bool value) {
if (bytePos == 0) {
arrayLimit++;
if (arrayLimit >= data.Length) {
// re-grow the array.
byte[] d = new byte[data.Length * 2];
for (int i = 0; i < data.Length; i++) {
d[i] = data[i];
}
data = d;
}
}
if (value) {
data[arrayPos] |= (byte) (0x01 << bytePos);
}
bytePos++;
if (bytePos >= 8) {
bytePos = 0;
arrayPos++;
}
}
public void Marshal(BinaryWriter dataOut) {
if (arrayLimit < 64) {
dataOut.Write((byte) arrayLimit);
} else if (arrayLimit < 256) { // max value of unsigned byte
dataOut.Write((byte) 0xC0);
dataOut.Write((byte) arrayLimit);
} else {
dataOut.Write((byte) 0xE0);
dataOut.Write((short) arrayLimit);
}
dataOut.Write(data, 0, arrayLimit);
Clear();
}
public void Unmarshal(BinaryReader dataIn) {
arrayLimit = dataIn.ReadByte();
if ((arrayLimit & 0xE0) != 0) {
arrayLimit = dataIn.ReadInt16();
} else if ((arrayLimit & 0xC0) != 0) {
arrayLimit = (short) (dataIn.ReadByte() & 0xFF);
}
if (data.Length < arrayLimit) {
data = new byte[arrayLimit];
}
dataIn.Read(data, 0, arrayLimit);
Clear();
}
public void Clear() {
arrayPos = 0;
bytePos = 0;
}
public int MarshalledSize() {
if (arrayLimit < 64) {
return 1 + arrayLimit;
} else {
return 2 + arrayLimit;
}
}
}
}

View File

@ -6,9 +6,15 @@ namespace OpenWire.Client.Core {
/// Represents an exception on the broker
/// </summary>
public class BrokerError : AbstractCommand {
private string message;
private string exceptionClass;
private string stackTrace;
public string Message {
get { return message; }
set { message = value; }
}
public string ExceptionClass {
get { return exceptionClass; }
set { exceptionClass = value; }

View File

@ -0,0 +1,401 @@
using System;
using System.IO;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
using OpenWire.Client.IO;
namespace OpenWire.Client.Core {
/// <summary>
/// A base class with useful implementation inheritence methods
/// for creating marshallers of the OpenWire protocol
/// </summary>
public abstract class DataStreamMarshaller {
public abstract DataStructure CreateObject();
public abstract byte GetDataStructureType();
public virtual int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
return 0;
}
public virtual void Marshal2(
OpenWireFormat wireFormat,
Object o,
BinaryWriter dataOut,
BooleanStream bs) {
}
public virtual void Unmarshal(
OpenWireFormat wireFormat,
Object o,
BinaryReader dataIn,
BooleanStream bs) {
}
public virtual int Marshal1Long(OpenWireFormat wireFormat, long o, BooleanStream bs) {
if (o == 0L) {
bs.WriteBoolean(false);
bs.WriteBoolean(false);
return 0;
} else {
ulong ul = (ulong) o;
if ((ul & 0xFFFFFFFFFFFF0000ul) == 0L) {
bs.WriteBoolean(false);
bs.WriteBoolean(true);
return 2;
} else if ((ul & 0xFFFFFFFF00000000ul) == 0L) {
bs.WriteBoolean(true);
bs.WriteBoolean(false);
return 4;
} else {
bs.WriteBoolean(true);
bs.WriteBoolean(true);
return 8;
}
}
}
public virtual void Marshal2Long(
OpenWireFormat wireFormat,
long o,
BinaryWriter dataOut,
BooleanStream bs) {
if (bs.ReadBoolean()) {
if (bs.ReadBoolean()) {
dataOut.Write(o);
} else {
dataOut.Write((int) o);
}
} else {
if (bs.ReadBoolean()) {
dataOut.Write((short) o);
}
}
}
public virtual long UnmarshalLong(OpenWireFormat wireFormat, BinaryReader dataIn, BooleanStream bs) {
if (bs.ReadBoolean()) {
if (bs.ReadBoolean()) {
return dataIn.ReadInt64();
} else {
return dataIn.ReadInt32();
}
} else {
if (bs.ReadBoolean()) {
return dataIn.ReadInt16();
} else {
return 0;
}
}
}
protected virtual DataStructure UnmarshalNestedObject(
OpenWireFormat wireFormat,
BinaryReader dataIn,
BooleanStream bs) {
return wireFormat.UnmarshalNestedObject(dataIn, bs);
}
protected virtual int Marshal1NestedObject(
OpenWireFormat wireFormat,
DataStructure o,
BooleanStream bs) {
return wireFormat.Marshal1NestedObject(o, bs);
}
protected virtual void Marshal2NestedObject(
OpenWireFormat wireFormat,
DataStructure o,
BinaryWriter dataOut,
BooleanStream bs) {
wireFormat.Marshal2NestedObject(o, dataOut, bs);
}
protected virtual DataStructure UnmarshalCachedObject(
OpenWireFormat wireFormat,
BinaryReader dataIn,
BooleanStream bs) {
/*
if (wireFormat.isCacheEnabled()) {
if (bs.ReadBoolean()) {
short index = dataIn.ReadInt16();
DataStructure value = wireFormat.UnmarshalNestedObject(dataIn, bs);
wireFormat.setInUnmarshallCache(index, value);
return value;
} else {
short index = dataIn.ReadInt16();
return wireFormat.getFromUnmarshallCache(index);
}
} else {
return wireFormat.UnmarshalNestedObject(dataIn, bs);
}
*/
return wireFormat.UnmarshalNestedObject(dataIn, bs);
}
protected virtual int Marshal1CachedObject(
OpenWireFormat wireFormat,
DataStructure o,
BooleanStream bs) {
/*
if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o);
bs.WriteBoolean(index == null);
if (index == null) {
int rc = wireFormat.Marshal1NestedObject(o, bs);
wireFormat.addToMarshallCache(o);
return 2 + rc;
} else {
return 2;
}
} else {
return wireFormat.Marshal1NestedObject(o, bs);
}
*/
return wireFormat.Marshal1NestedObject(o, bs);
}
protected virtual void Marshal2CachedObject(
OpenWireFormat wireFormat,
DataStructure o,
BinaryWriter dataOut,
BooleanStream bs) {
/*
if (wireFormat.isCacheEnabled()) {
Short index = wireFormat.getMarshallCacheIndex(o);
if (bs.ReadBoolean()) {
dataOut.Write((short)index.shortValue());
wireFormat.Marshal2NestedObject(o, dataOut, bs);
} else {
dataOut.Write((short)index.shortValue());
}
} else {
wireFormat.Marshal2NestedObject(o, dataOut, bs);
}
*/
wireFormat.Marshal2NestedObject(o, dataOut, bs);
}
protected virtual String ReadString(BinaryReader dataIn, BooleanStream bs) {
if (bs.ReadBoolean()) {
if (bs.ReadBoolean()) {
int size = dataIn.ReadInt16();
byte[] data = new byte[size];
dataIn.Read(data, 0, size);
char[] text = new char[size];
for (int i = 0; i < size; i++) {
text[i] = (char) data[i];
}
return new String(text);
} else {
return dataIn.ReadString();
}
} else {
return null;
}
}
protected virtual int WriteString(String value, BooleanStream bs) {
bs.WriteBoolean(value != null);
if (value != null) {
int strlen = value.Length;
int utflen = 0;
int c = 0;
bool isOnlyAscii = true;
char[] charr = value.ToCharArray();
for (int i = 0; i < strlen; i++) {
c = charr[i];
if ((c >= 0x0001) && (c <= 0x007F)) {
utflen++;
} else if (c > 0x07FF) {
utflen += 3;
isOnlyAscii = false;
} else {
isOnlyAscii = false;
utflen += 2;
}
}
if (utflen >= Int16.MaxValue)
throw new IOException("Encountered a String value that is too long to encode.");
bs.WriteBoolean(isOnlyAscii);
return utflen + 2;
} else {
return 0;
}
}
protected virtual void WriteString(String value, BinaryWriter dataOut, BooleanStream bs) {
if (bs.ReadBoolean()) {
// If we verified it only holds ascii values
if (bs.ReadBoolean()) {
dataOut.Write((short) value.Length);
dataOut.Write(value);
} else {
dataOut.Write(value);
}
}
}
protected virtual int MarshalObjectArray(
OpenWireFormat wireFormat,
DataStructure[] objects,
BooleanStream bs) {
if (objects != null) {
int rc = 0;
bs.WriteBoolean(true);
rc += 2;
for (int i = 0; i < objects.Length; i++) {
rc += Marshal1NestedObject(wireFormat, objects[i], bs);
}
return rc;
} else {
bs.WriteBoolean(false);
return 0;
}
}
protected virtual void MarshalObjectArray(
OpenWireFormat wireFormat,
DataStructure[] objects,
BinaryWriter dataOut,
BooleanStream bs) {
if (bs.ReadBoolean()) {
dataOut.Write((short) objects.Length);
for (int i = 0; i < objects.Length; i++) {
Marshal2NestedObject(wireFormat, objects[i], dataOut, bs);
}
}
}
protected virtual byte[] ReadBytes(BinaryReader dataIn, bool flag) {
if (flag) {
int size = dataIn.ReadInt32();
return dataIn.ReadBytes(size);
} else {
return null;
}
}
protected virtual byte[] ReadBytes(BinaryReader dataIn) {
int size = dataIn.ReadInt32();
return dataIn.ReadBytes(size);
}
protected virtual byte[] ReadBytes(BinaryReader dataIn, int size) {
return dataIn.ReadBytes(size);
}
protected virtual void WriteBytes(byte[] command, BinaryWriter dataOut) {
dataOut.Write(command.Length);
dataOut.Write(command);
}
protected virtual BrokerError UnmarshalBrokerError(
OpenWireFormat wireFormat,
BinaryReader dataIn,
BooleanStream bs) {
if (bs.ReadBoolean()) {
String clazz = ReadString(dataIn, bs);
String message = ReadString(dataIn, bs);
BrokerError answer = new BrokerError();
answer.ExceptionClass = clazz;
answer.Message = message;
return answer;
} else {
return null;
}
}
protected int MarshalBrokerError(OpenWireFormat wireFormat, BrokerError o, BooleanStream bs) {
if (o == null) {
bs.WriteBoolean(false);
return 0;
} else {
int rc = 0;
bs.WriteBoolean(true);
rc += WriteString(o.ExceptionClass, bs);
rc += WriteString(o.Message, bs);
return rc;
}
}
protected void MarshalBrokerError(
OpenWireFormat wireFormat,
BrokerError o,
BinaryWriter dataOut,
BooleanStream bs) {
if (bs.ReadBoolean()) {
WriteString(o.ExceptionClass, dataOut, bs);
WriteString(o.Message, dataOut, bs);
}
}
/*
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);
}
}
*/
}
}

View File

@ -7,6 +7,7 @@ namespace OpenWire.Client.Core {
/// </summary>
public interface DataStructure {
byte GetCommandType();
}
byte GetDataStructureType();
bool IsMarshallAware();
}
}

View File

@ -0,0 +1,23 @@
using System;
using OpenWire.Client;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
namespace OpenWire.Client.Core {
/// <summary>
/// Summary description for DataStructureSupport.
/// </summary>
public abstract class DataStructureSupport : DataStructure {
protected DataStructureSupport() {
}
public virtual byte GetDataStructureType() {
return 0;
}
public virtual bool IsMarshallAware() {
return false;
}
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.IO;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
using OpenWire.Client.IO;
namespace OpenWire.Client.Core {
/// <summary>
/// Represents a marshallable entity
/// </summary>
public interface MarshallAware {
void BeforeMarshall(OpenWireFormat wireFormat);
void AfterMarshall(OpenWireFormat wireFormat);
void BeforeUnmarshall(OpenWireFormat wireFormat);
void AfterUnmarshall(OpenWireFormat wireFormat);
void SetMarshalledForm(OpenWireFormat wireFormat, byte[] data);
byte[] GetMarshalledForm(OpenWireFormat wireFormat);
}
}

View File

@ -0,0 +1,133 @@
using System;
using System.IO;
using OpenWire.Client.Commands;
using OpenWire.Client.Core;
using OpenWire.Client.IO;
namespace OpenWire.Client.Core {
/// <summary>
/// Represents the wire format
/// </summary>
public class OpenWireFormat {
private DataStreamMarshaller[] dataMarshallers;
private const byte NULL_TYPE = 0;
public void addMarshaller(DataStreamMarshaller marshaller)
{
dataMarshallers[marshaller.GetDataStructureType()] = marshaller;
}
public void Marshal(Object o, BinaryWriter ds) {
int size = 1;
if (o != null) {
DataStructure c = (DataStructure) o;
byte type = c.GetDataStructureType();
DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF];
if (dsm == null)
throw new IOException("Unknown data type: " + type);
BooleanStream bs = new BooleanStream();
size += dsm.Marshal1(this, c, bs);
size += bs.MarshalledSize();
ds.Write(size);
ds.Write(type);
bs.Marshal(ds);
dsm.Marshal2(this, c, ds, bs);
} else {
ds.Write(size);
ds.Write(NULL_TYPE);
}
}
public Object Unmarshal(BinaryReader dis) {
byte dataType = dis.ReadByte();
if (dataType != NULL_TYPE) {
DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[dataType & 0xFF];
if (dsm == null)
throw new IOException("Unknown data type: " + dataType);
Object data = dsm.CreateObject();
BooleanStream bs = new BooleanStream();
bs.Unmarshal(dis);
dsm.Unmarshal(this, data, dis, bs);
return data;
} else {
return null;
}
}
public int Marshal1NestedObject(DataStructure o, BooleanStream bs) {
bs.WriteBoolean(o != null);
if (o == null)
return 0;
if (o.IsMarshallAware()) {
MarshallAware ma = (MarshallAware) o;
byte[] sequence = ma.GetMarshalledForm(this);
bs.WriteBoolean(sequence != null);
if (sequence != null) {
return 1 + sequence.Length;
}
}
byte type = o.GetDataStructureType();
DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF];
if (dsm == null)
throw new IOException("Unknown data type: " + type);
return 1 + dsm.Marshal1(this, o, bs);
}
public void Marshal2NestedObject(DataStructure o, BinaryWriter ds, BooleanStream bs) {
if (!bs.ReadBoolean())
return ;
byte type = o.GetDataStructureType();
ds.Write(type);
if (o.IsMarshallAware() && bs.ReadBoolean()) {
MarshallAware ma = (MarshallAware) o;
byte[] sequence = ma.GetMarshalledForm(this);
ds.Write(sequence, 0, sequence.Length);
} else {
DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[type & 0xFF];
if (dsm == null)
throw new IOException("Unknown data type: " + type);
dsm.Marshal2(this, o, ds, bs);
}
}
public DataStructure UnmarshalNestedObject(BinaryReader dis, BooleanStream bs) {
if (bs.ReadBoolean()) {
byte dataType = dis.ReadByte();
DataStreamMarshaller dsm = (DataStreamMarshaller) dataMarshallers[dataType & 0xFF];
if (dsm == null)
throw new IOException("Unknown data type: " + dataType);
DataStructure data = dsm.CreateObject();
if (data.IsMarshallAware() && bs.ReadBoolean()) {
dis.ReadInt32();
dis.ReadByte();
BooleanStream bs2 = new BooleanStream();
bs2.Unmarshal(dis);
dsm.Unmarshal(this, data, dis, bs2);
// TODO: extract the sequence from the dis and associate it.
// MarshallAware ma = (MarshallAware)data
// ma.setCachedMarshalledForm(this, sequence);
} else {
dsm.Unmarshal(this, data, dis, bs);
}
return data;
} else {
return null;
}
}
}
}

View File

@ -29,6 +29,7 @@ namespace OpenWire.Client.Core {
public event CommandHandler Command;
public event ExceptionHandler Exception;
private OpenWireFormat wireformat = new OpenWireFormat();
public SocketTransport(string host, int port) {
Console.WriteLine("Opening socket to: " + host + " on port: " + port);
@ -78,7 +79,7 @@ namespace OpenWire.Client.Core {
while (!closed) {
BaseCommand command = null;
try {
command = (BaseCommand) CommandMarshallerRegistry.ReadCommand(socketReader);
command = (BaseCommand) wireformat.Unmarshal(socketReader);
} catch (ObjectDisposedException e) {
// stream closed
break;
@ -113,7 +114,7 @@ namespace OpenWire.Client.Core {
protected void Send(Command command) {
lock (transmissionLock) {
CommandMarshallerRegistry.WriteCommand(command, socketWriter);
wireformat.Marshal(command, socketWriter);
socketWriter.Flush();
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller
//
// 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-core module
//
public class ActiveMQBytesMessageMarshaller : ActiveMQMessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQBytesMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQBytesMessage.ID_ActiveMQBytesMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQBytesMessage info = (ActiveMQBytesMessage)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,24 +26,51 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public abstract class ActiveMQDestinationMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public abstract class ActiveMQDestinationMarshaller : DataStreamMarshaller
{
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ActiveMQDestination info = (ActiveMQDestination)o;
info.PhysicalName = ReadString(dataIn, bs);
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);
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQDestination info = (ActiveMQDestination)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.PhysicalName, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ActiveMQDestination info = (ActiveMQDestination)o;
WriteString(info.PhysicalName, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller
//
// 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-core module
//
public class ActiveMQMapMessageMarshaller : ActiveMQMessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQMapMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQMapMessage.ID_ActiveMQMapMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQMapMessage info = (ActiveMQMapMessage)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,68 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQMessageMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ActiveMQMessageMarshaller : MessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQMessage.ID_ActiveMQMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ActiveMQMessage info = (ActiveMQMessage)o;
info.BeforeUnmarshall(wireFormat);
info.AfterUnmarshall(wireFormat);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQMessage info = (ActiveMQMessage)o;
info.BeforeMarshall(wireFormat);
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ActiveMQMessage info = (ActiveMQMessage)o;
info.AfterMarshall(wireFormat);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller
//
// 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-core module
//
public class ActiveMQObjectMessageMarshaller : ActiveMQMessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQObjectMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQObjectMessage.ID_ActiveMQObjectMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQObjectMessage info = (ActiveMQObjectMessage)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQQueueMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ActiveMQQueueMarshaller : ActiveMQDestinationMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQQueue();
}
public override byte GetDataStructureType()
{
return ActiveMQQueue.ID_ActiveMQQueue;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQQueue info = (ActiveMQQueue)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller
//
// 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-core module
//
public class ActiveMQStreamMessageMarshaller : ActiveMQMessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQStreamMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQStreamMessage.ID_ActiveMQStreamMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQStreamMessage info = (ActiveMQStreamMessage)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,18 +26,44 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public abstract class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public abstract class ActiveMQTempDestinationMarshaller : ActiveMQDestinationMarshaller
{
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
public override void BuildCommand(Command command, BinaryReader dataIn) {
base.BuildCommand(command, dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQTempDestination info = (ActiveMQTempDestination)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQTempQueueMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ActiveMQTempQueueMarshaller : ActiveMQTempDestinationMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQTempQueue();
}
public override byte GetDataStructureType()
{
return ActiveMQTempQueue.ID_ActiveMQTempQueue;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQTempQueue info = (ActiveMQTempQueue)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQTempTopicMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ActiveMQTempTopicMarshaller : ActiveMQTempDestinationMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQTempTopic();
}
public override byte GetDataStructureType()
{
return ActiveMQTempTopic.ID_ActiveMQTempTopic;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQTempTopic info = (ActiveMQTempTopic)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller
//
// 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-core module
//
public class ActiveMQTextMessageMarshaller : ActiveMQMessageMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQTextMessage();
}
public override byte GetDataStructureType()
{
return ActiveMQTextMessage.ID_ActiveMQTextMessage;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQTextMessage info = (ActiveMQTextMessage)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ActiveMQTopicMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ActiveMQTopicMarshaller : ActiveMQDestinationMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ActiveMQTopic();
}
public override byte GetDataStructureType()
{
return ActiveMQTopic.ID_ActiveMQTopic;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ActiveMQTopic info = (ActiveMQTopic)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,26 +26,53 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public abstract class BaseCommandMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public abstract class BaseCommandMarshaller : DataStreamMarshaller
{
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
BaseCommand info = (BaseCommand)o;
info.CommandId = dataIn.ReadInt16();
info.ResponseRequired = bs.ReadBoolean();
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);
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
BaseCommand info = (BaseCommand)o;
int rc = base.Marshal1(wireFormat, info, bs);
bs.WriteBoolean(info.ResponseRequired);
return rc + 1;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
BaseCommand info = (BaseCommand)o;
dataOut.Write((short)info.CommandId);
bs.ReadBoolean();
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class BrokerIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class BrokerIdMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new BrokerId();
}
public override byte GetDataStructureType()
{
return BrokerId.ID_BrokerId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
BrokerId info = (BrokerId)o;
info.Value = ReadString(dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
BrokerId info = (BrokerId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.Value, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
BrokerId info = (BrokerId)o;
WriteString(info.Value, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,34 +26,85 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class BrokerInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class BrokerInfoMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new BrokerInfo();
}
public override byte GetDataStructureType()
{
return BrokerInfo.ID_BrokerInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
BrokerInfo info = (BrokerInfo)o;
info.BrokerId = (BrokerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.BrokerURL = ReadString(dataIn, bs);
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerInfo[] value = new BrokerInfo[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerInfo) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.PeerBrokerInfos = value;
}
else {
info.PeerBrokerInfos = null;
}
info.BrokerName = ReadString(dataIn, bs);
info.SlaveBroker = bs.ReadBoolean();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
BrokerInfo info = (BrokerInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.BrokerId, bs);
rc += WriteString(info.BrokerURL, bs);
rc += MarshalObjectArray(wireFormat, info.PeerBrokerInfos, bs);
rc += WriteString(info.BrokerName, bs);
bs.WriteBoolean(info.SlaveBroker);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
BrokerInfo info = (BrokerInfo)o;
Marshal2CachedObject(wireFormat, info.BrokerId, dataOut, bs);
WriteString(info.BrokerURL, dataOut, bs);
MarshalObjectArray(wireFormat, info.PeerBrokerInfos, dataOut, bs);
WriteString(info.BrokerName, dataOut, bs);
bs.ReadBoolean();
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,30 +26,65 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ConnectionErrorMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ConnectionErrorMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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 = ReadBrokerError(dataIn);
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ConnectionError info = (ConnectionError) command;
WriteBrokerError(info.Exception, dataOut);
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
}
return new ConnectionError();
}
public override byte GetDataStructureType()
{
return ConnectionError.ID_ConnectionError;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ConnectionError info = (ConnectionError)o;
info.Exception = UnmarshalBrokerError(wireFormat, dataIn, bs);
info.ConnectionId = (ConnectionId) UnmarshalNestedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ConnectionError info = (ConnectionError)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += MarshalBrokerError(wireFormat, info.Exception, bs);
rc += Marshal1NestedObject(wireFormat, info.ConnectionId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ConnectionError info = (ConnectionError)o;
MarshalBrokerError(wireFormat, info.Exception, dataOut, bs);
Marshal2NestedObject(wireFormat, info.ConnectionId, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ConnectionIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ConnectionIdMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ConnectionId();
}
public override byte GetDataStructureType()
{
return ConnectionId.ID_ConnectionId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ConnectionId info = (ConnectionId)o;
info.Value = ReadString(dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ConnectionId info = (ConnectionId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.Value, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ConnectionId info = (ConnectionId)o;
WriteString(info.Value, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,36 +26,85 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ConnectionInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ConnectionInfoMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ConnectionInfo();
}
public override byte GetDataStructureType()
{
return ConnectionInfo.ID_ConnectionInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ConnectionInfo info = (ConnectionInfo)o;
info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.ClientId = ReadString(dataIn, bs);
info.Password = ReadString(dataIn, bs);
info.UserName = ReadString(dataIn, bs);
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerId[] value = new BrokerId[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.BrokerPath = value;
}
else {
info.BrokerPath = null;
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ConnectionInfo info = (ConnectionInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs);
rc += WriteString(info.ClientId, bs);
rc += WriteString(info.Password, bs);
rc += WriteString(info.UserName, bs);
rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ConnectionInfo info = (ConnectionInfo)o;
Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs);
WriteString(info.ClientId, dataOut, bs);
WriteString(info.Password, dataOut, bs);
WriteString(info.UserName, dataOut, bs);
MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,32 +26,68 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ConsumerIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ConsumerIdMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ConsumerId();
}
public override byte GetDataStructureType()
{
return ConsumerId.ID_ConsumerId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ConsumerId info = (ConsumerId)o;
info.ConnectionId = ReadString(dataIn, bs);
info.SessionId = UnmarshalLong(wireFormat, dataIn, bs);
info.Value = UnmarshalLong(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ConsumerId info = (ConsumerId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.ConnectionId, bs);
rc += Marshal1Long(wireFormat, info.SessionId, bs);
rc += Marshal1Long(wireFormat, info.Value, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ConsumerId info = (ConsumerId)o;
WriteString(info.ConnectionId, dataOut, bs);
Marshal2Long(wireFormat, info.SessionId, dataOut, bs);
Marshal2Long(wireFormat, info.Value, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,52 +26,107 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ConsumerInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ConsumerInfoMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ConsumerInfo();
}
public override byte GetDataStructureType()
{
return ConsumerInfo.ID_ConsumerInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ConsumerInfo info = (ConsumerInfo)o;
info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Browser = bs.ReadBoolean();
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.PrefetchSize = dataIn.ReadInt32();
info.DispatchAsync = bs.ReadBoolean();
info.Selector = ReadString(dataIn, bs);
info.SubcriptionName = ReadString(dataIn, bs);
info.NoLocal = bs.ReadBoolean();
info.Exclusive = bs.ReadBoolean();
info.Retroactive = bs.ReadBoolean();
info.Priority = dataIn.ReadByte();
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerId[] value = new BrokerId[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.BrokerPath = value;
}
else {
info.BrokerPath = null;
}
info.NetworkSubscription = bs.ReadBoolean();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ConsumerInfo info = (ConsumerInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs);
bs.WriteBoolean(info.Browser);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
bs.WriteBoolean(info.DispatchAsync);
rc += WriteString(info.Selector, bs);
rc += WriteString(info.SubcriptionName, bs);
bs.WriteBoolean(info.NoLocal);
bs.WriteBoolean(info.Exclusive);
bs.WriteBoolean(info.Retroactive);
rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs);
bs.WriteBoolean(info.NetworkSubscription);
return rc + 2;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ConsumerInfo info = (ConsumerInfo)o;
Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs);
bs.ReadBoolean();
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
dataOut.Write((int) info.PrefetchSize);
bs.ReadBoolean();
WriteString(info.Selector, dataOut, bs);
WriteString(info.SubcriptionName, dataOut, bs);
bs.ReadBoolean();
bs.ReadBoolean();
bs.ReadBoolean();
dataOut.Write((byte) info.Priority);
MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs);
bs.ReadBoolean();
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ControlCommandMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ControlCommandMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ControlCommand();
}
public override byte GetDataStructureType()
{
return ControlCommand.ID_ControlCommand;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ControlCommand info = (ControlCommand)o;
info.Command = ReadString(dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ControlCommand info = (ControlCommand)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.Command, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ControlCommand info = (ControlCommand)o;
WriteString(info.Command, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,73 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class DataArrayResponseMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class DataArrayResponseMarshaller : ResponseMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new DataArrayResponse();
}
public override byte GetDataStructureType()
{
return DataArrayResponse.ID_DataArrayResponse;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
DataArrayResponse info = (DataArrayResponse)o;
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
DataStructure[] value = new DataStructure[size];
for( int i=0; i < size; i++ ) {
value[i] = (DataStructure) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.Data = value;
}
else {
info.Data = null;
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
DataArrayResponse info = (DataArrayResponse)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += MarshalObjectArray(wireFormat, info.Data, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
DataArrayResponse info = (DataArrayResponse)o;
MarshalObjectArray(wireFormat, info.Data, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class DataResponseMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class DataResponseMarshaller : ResponseMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new DataResponse();
}
public override byte GetDataStructureType()
{
return DataResponse.ID_DataResponse;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
DataResponse info = (DataResponse)o;
info.Data = (DataStructure) UnmarshalNestedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
DataResponse info = (DataResponse)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1NestedObject(wireFormat, info.Data, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
DataResponse info = (DataResponse)o;
Marshal2NestedObject(wireFormat, info.Data, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,36 +26,84 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class DestinationInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class DestinationInfoMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new DestinationInfo();
}
public override byte GetDataStructureType()
{
return DestinationInfo.ID_DestinationInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
DestinationInfo info = (DestinationInfo)o;
info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.OperationType = dataIn.ReadByte();
info.Timeout = UnmarshalLong(wireFormat, dataIn, bs);
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerId[] value = new BrokerId[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.BrokerPath = value;
}
else {
info.BrokerPath = null;
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
DestinationInfo info = (DestinationInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += Marshal1Long(wireFormat, info.Timeout, bs);
rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs);
return rc + 1;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
DestinationInfo info = (DestinationInfo)o;
Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
dataOut.Write((byte) info.OperationType);
Marshal2Long(wireFormat, info.Timeout, dataOut, bs);
MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,30 +26,65 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class DiscoveryEventMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class DiscoveryEventMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new DiscoveryEvent();
}
public override byte GetDataStructureType()
{
return DiscoveryEvent.ID_DiscoveryEvent;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
DiscoveryEvent info = (DiscoveryEvent)o;
info.ServiceName = ReadString(dataIn, bs);
info.BrokerName = ReadString(dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
DiscoveryEvent info = (DiscoveryEvent)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.ServiceName, bs);
rc += WriteString(info.BrokerName, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
DiscoveryEvent info = (DiscoveryEvent)o;
WriteString(info.ServiceName, dataOut, bs);
WriteString(info.BrokerName, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ExceptionResponseMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ExceptionResponseMarshaller : ResponseMarshaller
{
public override DataStructure CreateObject()
{
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 = ReadBrokerError(dataIn);
}
public override void WriteCommand(Command command, BinaryWriter dataOut) {
base.WriteCommand(command, dataOut);
ExceptionResponse info = (ExceptionResponse) command;
WriteBrokerError(info.Exception, dataOut);
}
return new ExceptionResponse();
}
public override byte GetDataStructureType()
{
return ExceptionResponse.ID_ExceptionResponse;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ExceptionResponse info = (ExceptionResponse)o;
info.Exception = UnmarshalBrokerError(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ExceptionResponse info = (ExceptionResponse)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += MarshalBrokerError(wireFormat, info.Exception, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ExceptionResponse info = (ExceptionResponse)o;
MarshalBrokerError(wireFormat, info.Exception, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class FlushCommandMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class FlushCommandMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new FlushCommand();
}
public override byte GetDataStructureType()
{
return FlushCommand.ID_FlushCommand;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
FlushCommand info = (FlushCommand)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,61 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class IntegerResponseMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class IntegerResponseMarshaller : ResponseMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new IntegerResponse();
}
public override byte GetDataStructureType()
{
return IntegerResponse.ID_IntegerResponse;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
IntegerResponse info = (IntegerResponse)o;
info.Result = dataIn.ReadInt32();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
IntegerResponse info = (IntegerResponse)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 1;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
IntegerResponse info = (IntegerResponse)o;
dataOut.Write((int) info.Result);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,30 +26,65 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class JournalQueueAckMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class JournalQueueAckMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new JournalQueueAck();
}
public override byte GetDataStructureType()
{
return JournalQueueAck.ID_JournalQueueAck;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
JournalQueueAck info = (JournalQueueAck)o;
info.Destination = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.MessageAck = (MessageAck) UnmarshalNestedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
JournalQueueAck info = (JournalQueueAck)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1NestedObject(wireFormat, info.Destination, bs);
rc += Marshal1NestedObject(wireFormat, info.MessageAck, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
JournalQueueAck info = (JournalQueueAck)o;
Marshal2NestedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2NestedObject(wireFormat, info.MessageAck, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,38 +26,77 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class JournalTopicAckMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class JournalTopicAckMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new JournalTopicAck();
}
public override byte GetDataStructureType()
{
return JournalTopicAck.ID_JournalTopicAck;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
JournalTopicAck info = (JournalTopicAck)o;
info.Destination = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.MessageSequenceId = UnmarshalLong(wireFormat, dataIn, bs);
info.SubscritionName = ReadString(dataIn, bs);
info.ClientId = ReadString(dataIn, bs);
info.TransactionId = (TransactionId) UnmarshalNestedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
JournalTopicAck info = (JournalTopicAck)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1NestedObject(wireFormat, info.Destination, bs);
rc += Marshal1NestedObject(wireFormat, info.MessageId, bs);
rc += Marshal1Long(wireFormat, info.MessageSequenceId, bs);
rc += WriteString(info.SubscritionName, bs);
rc += WriteString(info.ClientId, bs);
rc += Marshal1NestedObject(wireFormat, info.TransactionId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
JournalTopicAck info = (JournalTopicAck)o;
Marshal2NestedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs);
Marshal2Long(wireFormat, info.MessageSequenceId, dataOut, bs);
WriteString(info.SubscritionName, dataOut, bs);
WriteString(info.ClientId, dataOut, bs);
Marshal2NestedObject(wireFormat, info.TransactionId, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,28 +26,62 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class JournalTraceMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class JournalTraceMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new JournalTrace();
}
public override byte GetDataStructureType()
{
return JournalTrace.ID_JournalTrace;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
JournalTrace info = (JournalTrace)o;
info.Message = ReadString(dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
JournalTrace info = (JournalTrace)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.Message, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
JournalTrace info = (JournalTrace)o;
WriteString(info.Message, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,32 +26,67 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class JournalTransactionMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class JournalTransactionMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new JournalTransaction();
}
public override byte GetDataStructureType()
{
return JournalTransaction.ID_JournalTransaction;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
JournalTransaction info = (JournalTransaction)o;
info.TransactionId = (TransactionId) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.Type = dataIn.ReadByte();
info.WasPrepared = bs.ReadBoolean();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
JournalTransaction info = (JournalTransaction)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1NestedObject(wireFormat, info.TransactionId, bs);
bs.WriteBoolean(info.WasPrepared);
return rc + 1;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
JournalTransaction info = (JournalTransaction)o;
Marshal2NestedObject(wireFormat, info.TransactionId, dataOut, bs);
dataOut.Write((byte) info.Type);
bs.ReadBoolean();
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,22 +26,55 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class KeepAliveInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class KeepAliveInfoMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new KeepAliveInfo();
}
public override byte GetDataStructureType()
{
return KeepAliveInfo.ID_KeepAliveInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
KeepAliveInfo info = (KeepAliveInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,30 +26,65 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class LocalTransactionIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class LocalTransactionIdMarshaller : TransactionIdMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new LocalTransactionId();
}
public override byte GetDataStructureType()
{
return LocalTransactionId.ID_LocalTransactionId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
LocalTransactionId info = (LocalTransactionId)o;
info.Value = UnmarshalLong(wireFormat, dataIn, bs);
info.ConnectionId = (ConnectionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
LocalTransactionId info = (LocalTransactionId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1Long(wireFormat, info.Value, bs);
rc += Marshal1CachedObject(wireFormat, info.ConnectionId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
LocalTransactionId info = (LocalTransactionId)o;
Marshal2Long(wireFormat, info.Value, dataOut, bs);
Marshal2CachedObject(wireFormat, info.ConnectionId, dataOut, bs);
}
}
}

View File

@ -0,0 +1,91 @@
//
//
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// 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 MarshallerFactory
{
public void configure(OpenWireFormat format)
{
format.addMarshaller(new MessageIdMarshaller());
format.addMarshaller(new BrokerInfoMarshaller());
format.addMarshaller(new ActiveMQTempQueueMarshaller());
format.addMarshaller(new LocalTransactionIdMarshaller());
format.addMarshaller(new RemoveSubscriptionInfoMarshaller());
format.addMarshaller(new IntegerResponseMarshaller());
format.addMarshaller(new ActiveMQQueueMarshaller());
format.addMarshaller(new DestinationInfoMarshaller());
format.addMarshaller(new ActiveMQBytesMessageMarshaller());
format.addMarshaller(new ShutdownInfoMarshaller());
format.addMarshaller(new DataResponseMarshaller());
format.addMarshaller(new SessionIdMarshaller());
format.addMarshaller(new DataArrayResponseMarshaller());
format.addMarshaller(new JournalQueueAckMarshaller());
format.addMarshaller(new WireFormatInfoMarshaller());
format.addMarshaller(new ResponseMarshaller());
format.addMarshaller(new ConnectionErrorMarshaller());
format.addMarshaller(new ActiveMQObjectMessageMarshaller());
format.addMarshaller(new ConsumerInfoMarshaller());
format.addMarshaller(new ActiveMQTempTopicMarshaller());
format.addMarshaller(new ConnectionIdMarshaller());
format.addMarshaller(new DiscoveryEventMarshaller());
format.addMarshaller(new ConnectionInfoMarshaller());
format.addMarshaller(new KeepAliveInfoMarshaller());
format.addMarshaller(new XATransactionIdMarshaller());
format.addMarshaller(new JournalTraceMarshaller());
format.addMarshaller(new FlushCommandMarshaller());
format.addMarshaller(new ConsumerIdMarshaller());
format.addMarshaller(new JournalTopicAckMarshaller());
format.addMarshaller(new ActiveMQTextMessageMarshaller());
format.addMarshaller(new BrokerIdMarshaller());
format.addMarshaller(new MessageDispatchMarshaller());
format.addMarshaller(new ProducerInfoMarshaller());
format.addMarshaller(new SubscriptionInfoMarshaller());
format.addMarshaller(new ActiveMQMapMessageMarshaller());
format.addMarshaller(new MessageDispatchNotificationMarshaller());
format.addMarshaller(new SessionInfoMarshaller());
format.addMarshaller(new ActiveMQMessageMarshaller());
format.addMarshaller(new TransactionInfoMarshaller());
format.addMarshaller(new ActiveMQStreamMessageMarshaller());
format.addMarshaller(new MessageAckMarshaller());
format.addMarshaller(new ProducerIdMarshaller());
format.addMarshaller(new ActiveMQTopicMarshaller());
format.addMarshaller(new JournalTransactionMarshaller());
format.addMarshaller(new RemoveInfoMarshaller());
format.addMarshaller(new ControlCommandMarshaller());
format.addMarshaller(new ExceptionResponseMarshaller());
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,40 +26,78 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class MessageAckMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class MessageAckMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new MessageAck();
}
public override byte GetDataStructureType()
{
return MessageAck.ID_MessageAck;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
MessageAck info = (MessageAck)o;
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.AckType = dataIn.ReadByte();
info.FirstMessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.LastMessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.MessageCount = dataIn.ReadInt32();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
MessageAck info = (MessageAck)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += Marshal1CachedObject(wireFormat, info.TransactionId, bs);
rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs);
rc += Marshal1NestedObject(wireFormat, info.FirstMessageId, bs);
rc += Marshal1NestedObject(wireFormat, info.LastMessageId, bs);
return rc + 2;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
MessageAck info = (MessageAck)o;
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2CachedObject(wireFormat, info.TransactionId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs);
dataOut.Write((byte) info.AckType);
Marshal2NestedObject(wireFormat, info.FirstMessageId, dataOut, bs);
Marshal2NestedObject(wireFormat, info.LastMessageId, dataOut, bs);
dataOut.Write((int) info.MessageCount);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,34 +26,70 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class MessageDispatchMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class MessageDispatchMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new MessageDispatch();
}
public override byte GetDataStructureType()
{
return MessageDispatch.ID_MessageDispatch;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
MessageDispatch info = (MessageDispatch)o;
info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Message = (Message) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.RedeliveryCounter = dataIn.ReadInt32();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
MessageDispatch info = (MessageDispatch)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += Marshal1NestedObject(wireFormat, info.Message, bs);
return rc + 1;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
MessageDispatch info = (MessageDispatch)o;
Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2NestedObject(wireFormat, info.Message, dataOut, bs);
dataOut.Write((int) info.RedeliveryCounter);
}
}
}

View File

@ -0,0 +1,96 @@
//
//
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
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
{
//
// Marshalling code for Open Wire Format for MessageDispatchNotification
//
//
// NOTE!: This file is autogenerated - do not modify!
// if you need to make a change, please see the Groovy scripts in the
// activemq-core module
//
public class MessageDispatchNotificationMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
return new MessageDispatchNotification();
}
public override byte GetDataStructureType()
{
return MessageDispatchNotification.ID_MessageDispatchNotification;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
MessageDispatchNotification info = (MessageDispatchNotification)o;
info.ConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.DeliverySequenceId = UnmarshalLong(wireFormat, dataIn, bs);
info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
MessageDispatchNotification info = (MessageDispatchNotification)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ConsumerId, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += Marshal1Long(wireFormat, info.DeliverySequenceId, bs);
rc += Marshal1NestedObject(wireFormat, info.MessageId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
MessageDispatchNotification info = (MessageDispatchNotification)o;
Marshal2CachedObject(wireFormat, info.ConsumerId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2Long(wireFormat, info.DeliverySequenceId, dataOut, bs);
Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,32 +26,68 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class MessageIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class MessageIdMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new MessageId();
}
public override byte GetDataStructureType()
{
return MessageId.ID_MessageId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
MessageId info = (MessageId)o;
info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.ProducerSequenceId = UnmarshalLong(wireFormat, dataIn, bs);
info.BrokerSequenceId = UnmarshalLong(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
MessageId info = (MessageId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs);
rc += Marshal1Long(wireFormat, info.ProducerSequenceId, bs);
rc += Marshal1Long(wireFormat, info.BrokerSequenceId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
MessageId info = (MessageId)o;
Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs);
Marshal2Long(wireFormat, info.ProducerSequenceId, dataOut, bs);
Marshal2Long(wireFormat, info.BrokerSequenceId, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,72 +26,139 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public abstract class MessageMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public abstract class MessageMarshaller : BaseCommandMarshaller
{
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
Message info = (Message)o;
info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.TransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.OriginalDestination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.MessageId = (MessageId) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.OriginalTransactionId = (TransactionId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.GroupID = ReadString(dataIn, bs);
info.GroupSequence = dataIn.ReadInt32();
info.CorrelationId = ReadString(dataIn, bs);
info.Persistent = bs.ReadBoolean();
info.Expiration = UnmarshalLong(wireFormat, dataIn, bs);
info.Priority = dataIn.ReadByte();
info.ReplyTo = (ActiveMQDestination) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.Timestamp = UnmarshalLong(wireFormat, dataIn, bs);
info.Type = ReadString(dataIn, bs);
info.Content = ReadBytes(dataIn, bs.ReadBoolean());
info.MarshalledProperties = ReadBytes(dataIn, bs.ReadBoolean());
info.DataStructure = (DataStructure) UnmarshalNestedObject(wireFormat, dataIn, bs);
info.TargetConsumerId = (ConsumerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Compressed = bs.ReadBoolean();
info.RedeliveryCounter = dataIn.ReadInt32();
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();
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerId[] value = new BrokerId[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.BrokerPath = value;
}
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);
else {
info.BrokerPath = null;
}
info.Arrival = UnmarshalLong(wireFormat, dataIn, bs);
info.UserID = ReadString(dataIn, bs);
info.RecievedByDFBridge = bs.ReadBoolean();
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
Message info = (Message)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += Marshal1CachedObject(wireFormat, info.TransactionId, bs);
rc += Marshal1CachedObject(wireFormat, info.OriginalDestination, bs);
rc += Marshal1NestedObject(wireFormat, info.MessageId, bs);
rc += Marshal1CachedObject(wireFormat, info.OriginalTransactionId, bs);
rc += WriteString(info.GroupID, bs);
rc += WriteString(info.CorrelationId, bs);
bs.WriteBoolean(info.Persistent);
rc += Marshal1Long(wireFormat, info.Expiration, bs);
rc += Marshal1NestedObject(wireFormat, info.ReplyTo, bs);
rc += Marshal1Long(wireFormat, info.Timestamp, bs);
rc += WriteString(info.Type, bs);
bs.WriteBoolean(info.Content!=null);
rc += info.Content==null ? 0 : info.Content.Length+4;
bs.WriteBoolean(info.MarshalledProperties!=null);
rc += info.MarshalledProperties==null ? 0 : info.MarshalledProperties.Length+4;
rc += Marshal1NestedObject(wireFormat, info.DataStructure, bs);
rc += Marshal1CachedObject(wireFormat, info.TargetConsumerId, bs);
bs.WriteBoolean(info.Compressed);
rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs);
rc += Marshal1Long(wireFormat, info.Arrival, bs);
rc += WriteString(info.UserID, bs);
bs.WriteBoolean(info.RecievedByDFBridge);
return rc + 3;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
Message info = (Message)o;
Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
Marshal2CachedObject(wireFormat, info.TransactionId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.OriginalDestination, dataOut, bs);
Marshal2NestedObject(wireFormat, info.MessageId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.OriginalTransactionId, dataOut, bs);
WriteString(info.GroupID, dataOut, bs);
dataOut.Write((int) info.GroupSequence);
WriteString(info.CorrelationId, dataOut, bs);
bs.ReadBoolean();
Marshal2Long(wireFormat, info.Expiration, dataOut, bs);
dataOut.Write((byte) info.Priority);
Marshal2NestedObject(wireFormat, info.ReplyTo, dataOut, bs);
Marshal2Long(wireFormat, info.Timestamp, dataOut, bs);
WriteString(info.Type, dataOut, bs);
if(bs.ReadBoolean()) {
dataOut.Write((int)info.Content.Length);
dataOut.Write(info.Content);
}
if(bs.ReadBoolean()) {
dataOut.Write((int)info.MarshalledProperties.Length);
dataOut.Write(info.MarshalledProperties);
}
Marshal2NestedObject(wireFormat, info.DataStructure, dataOut, bs);
Marshal2CachedObject(wireFormat, info.TargetConsumerId, dataOut, bs);
bs.ReadBoolean();
dataOut.Write((int) info.RedeliveryCounter);
MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs);
Marshal2Long(wireFormat, info.Arrival, dataOut, bs);
WriteString(info.UserID, dataOut, bs);
bs.ReadBoolean();
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,32 +26,68 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ProducerIdMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ProducerIdMarshaller : DataStreamMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ProducerId();
}
public override byte GetDataStructureType()
{
return ProducerId.ID_ProducerId;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ProducerId info = (ProducerId)o;
info.ConnectionId = ReadString(dataIn, bs);
info.Value = UnmarshalLong(wireFormat, dataIn, bs);
info.SessionId = UnmarshalLong(wireFormat, dataIn, bs);
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ProducerId info = (ProducerId)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += WriteString(info.ConnectionId, bs);
rc += Marshal1Long(wireFormat, info.Value, bs);
rc += Marshal1Long(wireFormat, info.SessionId, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ProducerId info = (ProducerId)o;
WriteString(info.ConnectionId, dataOut, bs);
Marshal2Long(wireFormat, info.Value, dataOut, bs);
Marshal2Long(wireFormat, info.SessionId, dataOut, bs);
}
}
}

View File

@ -1,10 +1,18 @@
//
// 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
// Copyright 2005-2006 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
using System;
@ -18,32 +26,79 @@ using OpenWire.Client.IO;
namespace OpenWire.Client.IO
{
public class ProducerInfoMarshaller : AbstractCommandMarshaller
//
// 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-core module
//
public class ProducerInfoMarshaller : BaseCommandMarshaller
{
public override DataStructure CreateObject()
{
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);
}
return new ProducerInfo();
}
public override byte GetDataStructureType()
{
return ProducerInfo.ID_ProducerInfo;
}
//
// Un-marshal an object instance from the data input stream
//
public override void Unmarshal(OpenWireFormat wireFormat, Object o, BinaryReader dataIn, BooleanStream bs)
{
base.Unmarshal(wireFormat, o, dataIn, bs);
ProducerInfo info = (ProducerInfo)o;
info.ProducerId = (ProducerId) UnmarshalCachedObject(wireFormat, dataIn, bs);
info.Destination = (ActiveMQDestination) UnmarshalCachedObject(wireFormat, dataIn, bs);
if (bs.ReadBoolean()) {
short size = dataIn.ReadInt16();
BrokerId[] value = new BrokerId[size];
for( int i=0; i < size; i++ ) {
value[i] = (BrokerId) UnmarshalNestedObject(wireFormat,dataIn, bs);
}
info.BrokerPath = value;
}
else {
info.BrokerPath = null;
}
}
//
// Write the booleans that this object uses to a BooleanStream
//
public override int Marshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) {
ProducerInfo info = (ProducerInfo)o;
int rc = base.Marshal1(wireFormat, info, bs);
rc += Marshal1CachedObject(wireFormat, info.ProducerId, bs);
rc += Marshal1CachedObject(wireFormat, info.Destination, bs);
rc += MarshalObjectArray(wireFormat, info.BrokerPath, bs);
return rc + 0;
}
//
// Write a object instance to data output stream
//
public override void Marshal2(OpenWireFormat wireFormat, Object o, BinaryWriter dataOut, BooleanStream bs) {
base.Marshal2(wireFormat, o, dataOut, bs);
ProducerInfo info = (ProducerInfo)o;
Marshal2CachedObject(wireFormat, info.ProducerId, dataOut, bs);
Marshal2CachedObject(wireFormat, info.Destination, dataOut, bs);
MarshalObjectArray(wireFormat, info.BrokerPath, dataOut, bs);
}
}
}

Some files were not shown because too many files have changed in this diff Show More