Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8D28175D2 for ; Thu, 18 Jun 2015 18:25:29 +0000 (UTC) Received: (qmail 78519 invoked by uid 500); 18 Jun 2015 18:25:29 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 78391 invoked by uid 500); 18 Jun 2015 18:25:29 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 78336 invoked by uid 99); 18 Jun 2015 18:25:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Jun 2015 18:25:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73CD2E3CA7; Thu, 18 Jun 2015 18:25:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tabish@apache.org To: commits@activemq.apache.org Date: Thu, 18 Jun 2015 18:25:30 -0000 Message-Id: In-Reply-To: <1288412d038d4a4b8f7a63d6832c27ac@git.apache.org> References: <1288412d038d4a4b8f7a63d6832c27ac@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/6] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5848 http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/RemoveSubscriptionInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/RemoveSubscriptionInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/RemoveSubscriptionInfoMarshaller.java new file mode 100644 index 0000000..9d2dfda --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/RemoveSubscriptionInfoMarshaller.java @@ -0,0 +1,139 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for RemoveSubscriptionInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class RemoveSubscriptionInfoMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return RemoveSubscriptionInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new RemoveSubscriptionInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setSubcriptionName(tightUnmarshalString(dataIn, bs)); + info.setClientId(tightUnmarshalString(dataIn, bs)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); + rc += tightMarshalString1(info.getSubcriptionName(), bs); + rc += tightMarshalString1(info.getClientId(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); + tightMarshalString2(info.getSubcriptionName(), dataOut, bs); + tightMarshalString2(info.getClientId(), dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setSubcriptionName(looseUnmarshalString(dataIn)); + info.setClientId(looseUnmarshalString(dataIn)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + RemoveSubscriptionInfo info = (RemoveSubscriptionInfo)o; + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); + looseMarshalString(info.getSubcriptionName(), dataOut); + looseMarshalString(info.getClientId(), dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ReplayCommandMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ReplayCommandMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ReplayCommandMarshaller.java new file mode 100644 index 0000000..ccde4f8 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ReplayCommandMarshaller.java @@ -0,0 +1,132 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for ReplayCommandMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class ReplayCommandMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return ReplayCommand.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new ReplayCommand(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + ReplayCommand info = (ReplayCommand)o; + info.setFirstNakNumber(dataIn.readInt()); + info.setLastNakNumber(dataIn.readInt()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + ReplayCommand info = (ReplayCommand)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + + return rc + 8; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + ReplayCommand info = (ReplayCommand)o; + dataOut.writeInt(info.getFirstNakNumber()); + dataOut.writeInt(info.getLastNakNumber()); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + ReplayCommand info = (ReplayCommand)o; + info.setFirstNakNumber(dataIn.readInt()); + info.setLastNakNumber(dataIn.readInt()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + ReplayCommand info = (ReplayCommand)o; + + super.looseMarshal(wireFormat, o, dataOut); + dataOut.writeInt(info.getFirstNakNumber()); + dataOut.writeInt(info.getLastNakNumber()); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ResponseMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ResponseMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ResponseMarshaller.java new file mode 100644 index 0000000..10c8ba6 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ResponseMarshaller.java @@ -0,0 +1,128 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for ResponseMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class ResponseMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return Response.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new Response(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + Response info = (Response)o; + info.setCorrelationId(dataIn.readInt()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + Response info = (Response)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + + return rc + 4; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + Response info = (Response)o; + dataOut.writeInt(info.getCorrelationId()); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + Response info = (Response)o; + info.setCorrelationId(dataIn.readInt()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + Response info = (Response)o; + + super.looseMarshal(wireFormat, o, dataOut); + dataOut.writeInt(info.getCorrelationId()); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionIdMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionIdMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionIdMarshaller.java new file mode 100644 index 0000000..6ecaaa9 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionIdMarshaller.java @@ -0,0 +1,134 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for SessionIdMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class SessionIdMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return SessionId.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new SessionId(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + SessionId info = (SessionId)o; + info.setConnectionId(tightUnmarshalString(dataIn, bs)); + info.setValue(tightUnmarshalLong(wireFormat, dataIn, bs)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + SessionId info = (SessionId)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalString1(info.getConnectionId(), bs); + rc+=tightMarshalLong1(wireFormat, info.getValue(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + SessionId info = (SessionId)o; + tightMarshalString2(info.getConnectionId(), dataOut, bs); + tightMarshalLong2(wireFormat, info.getValue(), dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + SessionId info = (SessionId)o; + info.setConnectionId(looseUnmarshalString(dataIn)); + info.setValue(looseUnmarshalLong(wireFormat, dataIn)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + SessionId info = (SessionId)o; + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalString(info.getConnectionId(), dataOut); + looseMarshalLong(wireFormat, info.getValue(), dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionInfoMarshaller.java new file mode 100644 index 0000000..9aa56d1 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SessionInfoMarshaller.java @@ -0,0 +1,129 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for SessionInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class SessionInfoMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return SessionInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new SessionInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + SessionInfo info = (SessionInfo)o; + info.setSessionId((org.apache.activemq.command.SessionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + SessionInfo info = (SessionInfo)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getSessionId(), bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + SessionInfo info = (SessionInfo)o; + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getSessionId(), dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + SessionInfo info = (SessionInfo)o; + info.setSessionId((org.apache.activemq.command.SessionId) looseUnmarsalCachedObject(wireFormat, dataIn)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + SessionInfo info = (SessionInfo)o; + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getSessionId(), dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ShutdownInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ShutdownInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ShutdownInfoMarshaller.java new file mode 100644 index 0000000..fb2494d --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/ShutdownInfoMarshaller.java @@ -0,0 +1,114 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for ShutdownInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class ShutdownInfoMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return ShutdownInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new ShutdownInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + int rc = super.tightMarshal1(wireFormat, o, bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + super.looseMarshal(wireFormat, o, dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SubscriptionInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SubscriptionInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SubscriptionInfoMarshaller.java new file mode 100644 index 0000000..0cf9a3e --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/SubscriptionInfoMarshaller.java @@ -0,0 +1,154 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for SubscriptionInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class SubscriptionInfoMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return SubscriptionInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new SubscriptionInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + SubscriptionInfo info = (SubscriptionInfo)o; + info.setClientId(tightUnmarshalString(dataIn, bs)); + info.setDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setSelector(tightUnmarshalString(dataIn, bs)); + info.setSubcriptionName(tightUnmarshalString(dataIn, bs)); + info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) tightUnmarsalNestedObject(wireFormat, dataIn, bs)); + info.setNoLocal(bs.readBoolean()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + SubscriptionInfo info = (SubscriptionInfo)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalString1(info.getClientId(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getDestination(), bs); + rc += tightMarshalString1(info.getSelector(), bs); + rc += tightMarshalString1(info.getSubcriptionName(), bs); + rc += tightMarshalNestedObject1(wireFormat, (DataStructure)info.getSubscribedDestination(), bs); + bs.writeBoolean(info.isNoLocal()); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + SubscriptionInfo info = (SubscriptionInfo)o; + tightMarshalString2(info.getClientId(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getDestination(), dataOut, bs); + tightMarshalString2(info.getSelector(), dataOut, bs); + tightMarshalString2(info.getSubcriptionName(), dataOut, bs); + tightMarshalNestedObject2(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut, bs); + bs.readBoolean(); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + SubscriptionInfo info = (SubscriptionInfo)o; + info.setClientId(looseUnmarshalString(dataIn)); + info.setDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setSelector(looseUnmarshalString(dataIn)); + info.setSubcriptionName(looseUnmarshalString(dataIn)); + info.setSubscribedDestination((org.apache.activemq.command.ActiveMQDestination) looseUnmarsalNestedObject(wireFormat, dataIn)); + info.setNoLocal(dataIn.readBoolean()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + SubscriptionInfo info = (SubscriptionInfo)o; + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalString(info.getClientId(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getDestination(), dataOut); + looseMarshalString(info.getSelector(), dataOut); + looseMarshalString(info.getSubcriptionName(), dataOut); + looseMarshalNestedObject(wireFormat, (DataStructure)info.getSubscribedDestination(), dataOut); + dataOut.writeBoolean(info.isNoLocal()); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionIdMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionIdMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionIdMarshaller.java new file mode 100644 index 0000000..9613b07 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionIdMarshaller.java @@ -0,0 +1,99 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for TransactionIdMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public abstract class TransactionIdMarshaller extends BaseDataStreamMarshaller { + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + int rc = super.tightMarshal1(wireFormat, o, bs); + + return rc + 0; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + super.looseMarshal(wireFormat, o, dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionInfoMarshaller.java new file mode 100644 index 0000000..c762ad9 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/TransactionInfoMarshaller.java @@ -0,0 +1,138 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for TransactionInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class TransactionInfoMarshaller extends BaseCommandMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return TransactionInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new TransactionInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + TransactionInfo info = (TransactionInfo)o; + info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat, dataIn, bs)); + info.setType(dataIn.readByte()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + TransactionInfo info = (TransactionInfo)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getConnectionId(), bs); + rc += tightMarshalCachedObject1(wireFormat, (DataStructure)info.getTransactionId(), bs); + + return rc + 1; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + TransactionInfo info = (TransactionInfo)o; + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getConnectionId(), dataOut, bs); + tightMarshalCachedObject2(wireFormat, (DataStructure)info.getTransactionId(), dataOut, bs); + dataOut.writeByte(info.getType()); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + TransactionInfo info = (TransactionInfo)o; + info.setConnectionId((org.apache.activemq.command.ConnectionId) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setTransactionId((org.apache.activemq.command.TransactionId) looseUnmarsalCachedObject(wireFormat, dataIn)); + info.setType(dataIn.readByte()); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + TransactionInfo info = (TransactionInfo)o; + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getConnectionId(), dataOut); + looseMarshalCachedObject(wireFormat, (DataStructure)info.getTransactionId(), dataOut); + dataOut.writeByte(info.getType()); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java new file mode 100644 index 0000000..ef5e569 --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/WireFormatInfoMarshaller.java @@ -0,0 +1,154 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for WireFormatInfoMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class WireFormatInfoMarshaller extends BaseDataStreamMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return WireFormatInfo.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new WireFormatInfo(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + WireFormatInfo info = (WireFormatInfo)o; + + info.beforeUnmarshall(wireFormat); + + info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8)); + info.setVersion(dataIn.readInt()); + info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs)); + + info.afterUnmarshall(wireFormat); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + WireFormatInfo info = (WireFormatInfo)o; + + info.beforeMarshall(wireFormat); + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalConstByteArray1(info.getMagic(), bs, 8); + rc += tightMarshalByteSequence1(info.getMarshalledProperties(), bs); + + return rc + 4; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + WireFormatInfo info = (WireFormatInfo)o; + tightMarshalConstByteArray2(info.getMagic(), dataOut, bs, 8); + dataOut.writeInt(info.getVersion()); + tightMarshalByteSequence2(info.getMarshalledProperties(), dataOut, bs); + + info.afterMarshall(wireFormat); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + WireFormatInfo info = (WireFormatInfo)o; + + info.beforeUnmarshall(wireFormat); + + info.setMagic(looseUnmarshalConstByteArray(dataIn, 8)); + info.setVersion(dataIn.readInt()); + info.setMarshalledProperties(looseUnmarshalByteSequence(dataIn)); + + info.afterUnmarshall(wireFormat); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + WireFormatInfo info = (WireFormatInfo)o; + + info.beforeMarshall(wireFormat); + + super.looseMarshal(wireFormat, o, dataOut); + looseMarshalConstByteArray(wireFormat, info.getMagic(), dataOut, 8); + dataOut.writeInt(info.getVersion()); + looseMarshalByteSequence(wireFormat, info.getMarshalledProperties(), dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java ---------------------------------------------------------------------- diff --git a/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java new file mode 100644 index 0000000..ee4b5ec --- /dev/null +++ b/activemq-client/src/main/java/org/apache/activemq/openwire/v11/XATransactionIdMarshaller.java @@ -0,0 +1,138 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ + +package org.apache.activemq.openwire.v11; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.activemq.openwire.*; +import org.apache.activemq.command.*; + + + +/** + * Marshalling code for Open Wire Format for XATransactionIdMarshaller + * + * + * NOTE!: This file is auto generated - do not modify! + * if you need to make a change, please see the modify the groovy scripts in the + * under src/gram/script and then use maven openwire:generate to regenerate + * this file. + * + * + */ +public class XATransactionIdMarshaller extends TransactionIdMarshaller { + + /** + * Return the type of Data Structure we marshal + * @return short representation of the type data structure + */ + public byte getDataStructureType() { + return XATransactionId.DATA_STRUCTURE_TYPE; + } + + /** + * @return a new object instance + */ + public DataStructure createObject() { + return new XATransactionId(); + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { + super.tightUnmarshal(wireFormat, o, dataIn, bs); + + XATransactionId info = (XATransactionId)o; + info.setFormatId(dataIn.readInt()); + info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs)); + info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { + + XATransactionId info = (XATransactionId)o; + + int rc = super.tightMarshal1(wireFormat, o, bs); + rc += tightMarshalByteArray1(info.getGlobalTransactionId(), bs); + rc += tightMarshalByteArray1(info.getBranchQualifier(), bs); + + return rc + 4; + } + + /** + * Write a object instance to data output stream + * + * @param o the instance to be marshaled + * @param dataOut the output stream + * @throws IOException thrown if an error occurs + */ + public void tightMarshal2(OpenWireFormat wireFormat, Object o, DataOutput dataOut, BooleanStream bs) throws IOException { + super.tightMarshal2(wireFormat, o, dataOut, bs); + + XATransactionId info = (XATransactionId)o; + dataOut.writeInt(info.getFormatId()); + tightMarshalByteArray2(info.getGlobalTransactionId(), dataOut, bs); + tightMarshalByteArray2(info.getBranchQualifier(), dataOut, bs); + + } + + /** + * Un-marshal an object instance from the data input stream + * + * @param o the object to un-marshal + * @param dataIn the data input stream to build the object from + * @throws IOException + */ + public void looseUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn) throws IOException { + super.looseUnmarshal(wireFormat, o, dataIn); + + XATransactionId info = (XATransactionId)o; + info.setFormatId(dataIn.readInt()); + info.setGlobalTransactionId(looseUnmarshalByteArray(dataIn)); + info.setBranchQualifier(looseUnmarshalByteArray(dataIn)); + + } + + + /** + * Write the booleans that this object uses to a BooleanStream + */ + public void looseMarshal(OpenWireFormat wireFormat, Object o, DataOutput dataOut) throws IOException { + + XATransactionId info = (XATransactionId)o; + + super.looseMarshal(wireFormat, o, dataOut); + dataOut.writeInt(info.getFormatId()); + looseMarshalByteArray(wireFormat, info.getGlobalTransactionId(), dataOut); + looseMarshalByteArray(wireFormat, info.getBranchQualifier(), dataOut); + + } +} http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreExporter.java ---------------------------------------------------------------------- diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreExporter.java b/activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreExporter.java index e9a5efe..2bb47a7 100644 --- a/activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreExporter.java +++ b/activemq-console/src/main/java/org/apache/activemq/console/command/store/StoreExporter.java @@ -43,11 +43,12 @@ import org.apache.activemq.store.MessageStore; import org.apache.activemq.store.PersistenceAdapter; import org.apache.activemq.store.TopicMessageStore; import org.apache.activemq.store.TransactionRecoveryListener; -import com.fasterxml.jackson.databind.ObjectMapper; import org.fusesource.hawtbuf.AsciiBuffer; import org.fusesource.hawtbuf.DataByteArrayOutputStream; import org.fusesource.hawtbuf.UTF8Buffer; +import com.fasterxml.jackson.databind.ObjectMapper; + /** * @author Hiram Chirino */ @@ -189,6 +190,7 @@ public class StoreExporter { if (sub.getSelector() != null) { jsonMap.put("selector", sub.getSelector()); } + jsonMap.put("noLocal", sub.isNoLocal()); String json = mapper.writeValueAsString(jsonMap); System.out.println(json); http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-openwire-generator/pom.xml ---------------------------------------------------------------------- diff --git a/activemq-openwire-generator/pom.xml b/activemq-openwire-generator/pom.xml index 5d0c04f..0276275 100644 --- a/activemq-openwire-generator/pom.xml +++ b/activemq-openwire-generator/pom.xml @@ -56,14 +56,14 @@ java.vendor - Sun Microsystems Inc. + Oracle Corporation com.sun tools - 1.4.2 + 1.5 system ${java.home}/../lib/tools.jar http://git-wip-us.apache.org/repos/asf/activemq/blob/833d3083/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java ---------------------------------------------------------------------- diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java index a5233ee..416987a 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/ConcurrentProducerDurableConsumerTest.java @@ -59,6 +59,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -74,11 +75,11 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { private final TestSupport.PersistenceAdapterChoice persistenceAdapterChoice; - @Parameterized.Parameters + @Parameters(name="{0}") public static Collection getTestParameters() { - TestSupport.PersistenceAdapterChoice[] kahaDb = {TestSupport.PersistenceAdapterChoice.KahaDB}; - TestSupport.PersistenceAdapterChoice[] levelDb = {TestSupport.PersistenceAdapterChoice.LevelDB}; - TestSupport.PersistenceAdapterChoice[] mem = {TestSupport.PersistenceAdapterChoice.MEM}; + TestSupport.PersistenceAdapterChoice[] kahaDb = { TestSupport.PersistenceAdapterChoice.KahaDB }; + TestSupport.PersistenceAdapterChoice[] levelDb = { TestSupport.PersistenceAdapterChoice.LevelDB }; + TestSupport.PersistenceAdapterChoice[] mem = { TestSupport.PersistenceAdapterChoice.MEM }; List choices = new ArrayList(); choices.add(kahaDb); choices.add(levelDb); @@ -102,8 +103,8 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { // preload the durable consumers double[] inactiveConsumerStats = produceMessages(destination, 500, 10, session, producer, null); - LOG.info("With inactive consumers: ave: " + inactiveConsumerStats[1] - + ", max: " + inactiveConsumerStats[0] + ", multiplier: " + (inactiveConsumerStats[0]/inactiveConsumerStats[1])); + LOG.info("With inactive consumers: ave: " + inactiveConsumerStats[1] + ", max: " + inactiveConsumerStats[0] + ", multiplier: " + + (inactiveConsumerStats[0] / inactiveConsumerStats[1])); // periodically start a durable sub that has a backlog final int consumersToActivate = 5; @@ -137,9 +138,10 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { double[] statsWithActive = produceMessages(destination, 500, 10, session, producer, addConsumerSignal); - LOG.info(" with concurrent activate, ave: " + statsWithActive[1] + ", max: " + statsWithActive[0] + ", multiplier: " + (statsWithActive[0]/ statsWithActive[1])); + LOG.info(" with concurrent activate, ave: " + statsWithActive[1] + ", max: " + statsWithActive[0] + ", multiplier: " + + (statsWithActive[0] / statsWithActive[1])); - while(consumers.size() < consumersToActivate) { + while (consumers.size() < consumersToActivate) { TimeUnit.SECONDS.sleep(2); } @@ -149,24 +151,18 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { timeToFirstAccumulator += time; LOG.info("Time to first " + time); } - LOG.info("Ave time to first message =" + timeToFirstAccumulator/consumers.size()); + LOG.info("Ave time to first message =" + timeToFirstAccumulator / consumers.size()); for (TimedMessageListener listener : consumers.values()) { LOG.info("Ave batch receipt time: " + listener.waitForReceivedLimit(10000) + " max receipt: " + listener.maxReceiptTime); } - //assertTrue("max (" + statsWithActive[0] + ") within reasonable multiplier of ave (" + statsWithActive[1] + ")", - // statsWithActive[0] < 5 * statsWithActive[1]); - // compare no active to active - LOG.info("Ave send time with active: " + statsWithActive[1] - + " as multiplier of ave with none active: " + inactiveConsumerStats[1] - + ", multiplier=" + (statsWithActive[1]/inactiveConsumerStats[1])); - - assertTrue("Ave send time with active: " + statsWithActive[1] - + " within reasonable multpler of ave with none active: " + inactiveConsumerStats[1] - + ", multiplier " + (statsWithActive[1]/inactiveConsumerStats[1]), - statsWithActive[1] < 15 * inactiveConsumerStats[1]); + LOG.info("Ave send time with active: " + statsWithActive[1] + " as multiplier of ave with none active: " + inactiveConsumerStats[1] + ", multiplier=" + + (statsWithActive[1] / inactiveConsumerStats[1])); + + assertTrue("Ave send time with active: " + statsWithActive[1] + " within reasonable multpler of ave with none active: " + inactiveConsumerStats[1] + + ", multiplier " + (statsWithActive[1] / inactiveConsumerStats[1]), statsWithActive[1] < 15 * inactiveConsumerStats[1]); } public void x_testSendWithInactiveAndActiveConsumers() throws Exception { @@ -189,12 +185,11 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { double[] withConsumerStats = produceMessages(destination, toSend, numIterations, session, producer, null); - LOG.info("With consumer: " + withConsumerStats[1] + " , with noConsumer: " + noConsumerStats[1] - + ", multiplier: " + (withConsumerStats[1]/noConsumerStats[1])); + LOG.info("With consumer: " + withConsumerStats[1] + " , with noConsumer: " + noConsumerStats[1] + ", multiplier: " + + (withConsumerStats[1] / noConsumerStats[1])); final int reasonableMultiplier = 15; // not so reasonable but improving - assertTrue("max X times as slow with consumer: " + withConsumerStats[1] + ", with no Consumer: " - + noConsumerStats[1] + ", multiplier: " + (withConsumerStats[1]/noConsumerStats[1]), - withConsumerStats[1] < noConsumerStats[1] * reasonableMultiplier); + assertTrue("max X times as slow with consumer: " + withConsumerStats[1] + ", with no Consumer: " + noConsumerStats[1] + ", multiplier: " + + (withConsumerStats[1] / noConsumerStats[1]), withConsumerStats[1] < noConsumerStats[1] * reasonableMultiplier); final int toReceive = toSend * numIterations * consumerCount * 2; Wait.waitFor(new Wait.Condition() { @@ -217,7 +212,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { private void startInactiveConsumers(ConnectionFactory factory, Destination destination) throws Exception { // create off line consumers startConsumers(factory, destination); - for (Connection connection: connections) { + for (Connection connection : connections) { connection.close(); } connections.clear(); @@ -240,7 +235,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { conn.start(); Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - final TopicSubscriber consumer = sess.createDurableSubscriber((javax.jms.Topic)dest, name); + final TopicSubscriber consumer = sess.createDurableSubscriber((javax.jms.Topic) dest, name); return consumer; } @@ -249,22 +244,18 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { * @return max and ave send time * @throws Exception */ - private double[] produceMessages(Destination destination, - final int toSend, - final int numIterations, - Session session, - MessageProducer producer, - Object addConsumerSignal) throws Exception { + private double[] produceMessages(Destination destination, final int toSend, final int numIterations, Session session, MessageProducer producer, + Object addConsumerSignal) throws Exception { long start; long count = 0; double batchMax = 0, max = 0, sum = 0; - for (int i=0; i - mysql - mysql-connector-java - 5.1.10 - test - - - commons-dbcp - commons-dbcp - 1.2.2 - test - - */ -// } else { - setPersistenceAdapter(brokerService, persistenceAdapterChoice); -// } + setPersistenceAdapter(brokerService, persistenceAdapterChoice); + return brokerService; } @Override protected ActiveMQConnectionFactory createConnectionFactory() throws Exception { - ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory( - broker.getTransportConnectors().get(0).getPublishableConnectString()); + ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(broker.getTransportConnectors().get(0).getPublishableConnectString()); ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy(); prefetchPolicy.setAll(1); factory.setPrefetchPolicy(prefetchPolicy); @@ -420,9 +379,10 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { int priority = 0; try { priority = message.getJMSPriority(); - } catch (JMSException ignored) {} + } catch (JMSException ignored) { + } if (!messageLists.containsKey(priority)) { - MessageIdList perPriorityList = new MessageIdList(); + MessageIdList perPriorityList = new MessageIdList(); perPriorityList.setParent(allMessagesList); messageLists.put(priority, perPriorityList); } @@ -433,7 +393,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { LOG.info("First receipt in " + firstReceipt + "ms"); } else if (count.get() % batchSize == 0) { LOG.info("Consumed " + count.get() + " in " + batchReceiptAccumulator + "ms" + ", priority:" + priority); - batchReceiptAccumulator=0; + batchReceiptAccumulator = 0; } maxReceiptTime = Math.max(maxReceiptTime, duration); receiptAccumulator += duration; @@ -451,7 +411,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { } public long waitForReceivedLimit(long limit) throws Exception { - final long expiry = System.currentTimeMillis() + 30*60*1000; + final long expiry = System.currentTimeMillis() + 30 * 60 * 1000; while (count.get() < limit) { if (System.currentTimeMillis() > expiry) { throw new RuntimeException("Expired waiting for X messages, " + limit); @@ -464,7 +424,7 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { } } - return receiptAccumulator/(limit/batchSize); + return receiptAccumulator / (limit / batchSize); } private String findFirstMissingMessage() { @@ -476,9 +436,9 @@ public class ConcurrentProducerDurableConsumerTest extends TestSupport { if (previous == null) { previous = current.copy(); } else { - if (current.getProducerSequenceId() - 1 != previous.getProducerSequenceId() && - current.getProducerSequenceId() - 10 != previous.getProducerSequenceId()) { - return "Missing next after: " + previous + ", got: " + current; + if (current.getProducerSequenceId() - 1 != previous.getProducerSequenceId() + && current.getProducerSequenceId() - 10 != previous.getProducerSequenceId()) { + return "Missing next after: " + previous + ", got: " + current; } else { previous = current.copy(); }