applying updates for JIRA issue AMQ-656 (attachment source_060515.zip)

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@406628 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nathan Christopher Mittler 2006-05-15 13:38:57 +00:00
parent e5bbcb532b
commit 60e84b8429
182 changed files with 12411 additions and 8200 deletions

48
openwire-cpp/README.txt Normal file
View File

@ -0,0 +1,48 @@
Apache ActiveMQ C++ Client
==========================
The ActiveMQ C++ client has support for both synchrounous and asynchrounous messaging as well as local transactions and more. To ease programming it uses smart pointers and STL extensively. For more information see included test programs.
How to build
============
To run the supplied makefiles you need to set two environment variables, CONFIG and OSTYPE. With the help of variables the makefiles can determine what settings needs to be set for your platform.
CONFIG can be set to either "debug" or "release" depending on what type of output you want. OSTYPE is set to "linux" or "macosx".
For Windows, use the Visual Studio 2005 project files.
Connection URI
==============
To connect to the ActiveMQ broker a URI is specified. The URI may have a set of configuration parameters that are used to configure the client.
Sample URI: "tcp://192.168.64.142:61616?trace=false&protocol=openwire&encoding=none"
Scheme
------
Name......: tcp
Desciption: Type of transport protocol
Mandatory.: Yes
Parameters
----------
Name......: protocol
Desciption: Type of wire protocol
Default...: "openwire"
Values....: "openwire"
Mandatory.: No
Name......: encoding
Desciption: Character encoding
Default...: "AsciiToUTF8"
Values....: "none", "AsciiToUTF8"
Mandatory.: No
Name......: trace
Desciption: Enables debug output to console
Default...: "false"
Values....: "true", "false"
Mandatory.: No

View File

@ -46,6 +46,7 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\amqlib.pdb"
WarningLevel="4"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
@ -108,6 +109,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\amqlib.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
@ -178,6 +180,14 @@
RelativePath=".\src\main\cpp\activemq\ConnectionClosedException.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ConnectionControl.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ConnectionControl.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\ConnectionException.hpp"
>
@ -198,6 +208,14 @@
RelativePath=".\src\main\cpp\activemq\ConsumerClosedException.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ConsumerControl.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ConsumerControl.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\DestinationFilter.cpp"
>
@ -281,14 +299,6 @@
<Filter
Name="command"
>
<File
RelativePath=".\src\main\cpp\activemq\command\AbstractCommand.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\AbstractCommand.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ActiveMQBytesMessage.cpp"
>
@ -393,6 +403,14 @@
RelativePath=".\src\main\cpp\activemq\command\BaseCommand.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\BaseDataStructure.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\BaseDataStructure.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\BooleanExpression.hpp"
>
@ -565,6 +583,14 @@
RelativePath=".\src\main\cpp\activemq\command\KeepAliveInfo.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\LastPartialCommand.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\LastPartialCommand.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\LocalTransactionId.cpp"
>
@ -613,6 +639,22 @@
RelativePath=".\src\main\cpp\activemq\command\MessageId.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\NetworkBridgeFilter.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\NetworkBridgeFilter.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\PartialCommand.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\PartialCommand.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ProducerId.cpp"
>
@ -645,6 +687,14 @@
RelativePath=".\src\main\cpp\activemq\command\RemoveSubscriptionInfo.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ReplayCommand.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\ReplayCommand.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\activemq\command\Response.cpp"
>
@ -949,6 +999,22 @@
<Filter
Name="io"
>
<File
RelativePath=".\src\main\cpp\ppr\io\BufferedInputStream.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\BufferedInputStream.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\BufferedOutputStream.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\BufferedOutputStream.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\ByteArrayInputStream.cpp"
>
@ -1013,6 +1079,30 @@
RelativePath=".\src\main\cpp\ppr\io\SocketOutputStream.hpp"
>
</File>
<Filter
Name="encoding"
>
<File
RelativePath=".\src\main\cpp\ppr\io\encoding\AsciiToUTF8Encoder.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\encoding\AsciiToUTF8Encoder.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\encoding\CharsetEncoderRegistry.cpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\encoding\CharsetEncoderRegistry.hpp"
>
</File>
<File
RelativePath=".\src\main\cpp\ppr\io\encoding\ICharsetEncoder.hpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="net"

View File

@ -47,6 +47,7 @@
SmallerTypeCheck="true"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)\test.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
@ -122,6 +123,7 @@
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="2"
ProgramDataBaseFileName="$(IntDir)\test.pdb"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
@ -179,15 +181,47 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\test\cpp\TestListener.cpp"
RelativePath=".\src\test\cpp\IUnitTest.hpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestListener.hpp"
RelativePath=".\src\test\cpp\TestAsynchQueue.cpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestMain.cpp"
RelativePath=".\src\test\cpp\TestAsynchQueue.hpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestAsynchTopic.cpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestAsynchTopic.hpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestLocalTXCommit.cpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestLocalTXCommit.hpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestSuite.cpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestSuite.hpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestSynchQueue.cpp"
>
</File>
<File
RelativePath=".\src\test\cpp\TestSynchQueue.hpp"
>
</File>
</Filter>

View File

@ -1,5 +1,6 @@
SRCDIR = src/main/cpp
MAKESUPPORT_HOME = $(PWD)
TSTDIR = src/test/cpp
MAKE_HOME = $(PWD)
LIBOFILES = \
$(OUTDIR)/activemq/BrokerException.o \
@ -15,7 +16,6 @@ LIBOFILES = \
$(OUTDIR)/activemq/Session.o \
$(OUTDIR)/activemq/TransactionContext.o \
\
$(OUTDIR)/activemq/command/AbstractCommand.o \
$(OUTDIR)/activemq/command/ActiveMQBytesMessage.o \
$(OUTDIR)/activemq/command/ActiveMQDestination.o \
$(OUTDIR)/activemq/command/ActiveMQMapMessage.o \
@ -23,17 +23,21 @@ LIBOFILES = \
$(OUTDIR)/activemq/command/ActiveMQObjectMessage.o \
$(OUTDIR)/activemq/command/ActiveMQQueue.o \
$(OUTDIR)/activemq/command/ActiveMQStreamMessage.o \
$(OUTDIR)/activemq/command/ActiveMQTempDestination.o \
$(OUTDIR)/activemq/command/ActiveMQTempQueue.o \
$(OUTDIR)/activemq/command/ActiveMQTempTopic.o \
$(OUTDIR)/activemq/command/ActiveMQTextMessage.o \
$(OUTDIR)/activemq/command/ActiveMQTopic.o \
$(OUTDIR)/activemq/command/BaseDataStructure.o \
$(OUTDIR)/activemq/command/BaseCommand.o \
$(OUTDIR)/activemq/command/BrokerError.o \
$(OUTDIR)/activemq/command/BrokerId.o \
$(OUTDIR)/activemq/command/BrokerInfo.o \
$(OUTDIR)/activemq/command/ConnectionControl.o \
$(OUTDIR)/activemq/command/ConnectionError.o \
$(OUTDIR)/activemq/command/ConnectionId.o \
$(OUTDIR)/activemq/command/ConnectionInfo.o \
$(OUTDIR)/activemq/command/ConsumerControl.o \
$(OUTDIR)/activemq/command/ConsumerId.o \
$(OUTDIR)/activemq/command/ConsumerInfo.o \
$(OUTDIR)/activemq/command/ControlCommand.o \
@ -49,16 +53,20 @@ LIBOFILES = \
$(OUTDIR)/activemq/command/JournalTrace.o \
$(OUTDIR)/activemq/command/JournalTransaction.o \
$(OUTDIR)/activemq/command/KeepAliveInfo.o \
$(OUTDIR)/activemq/command/LastPartialCommand.o \
$(OUTDIR)/activemq/command/LocalTransactionId.o \
$(OUTDIR)/activemq/command/Message.o \
$(OUTDIR)/activemq/command/MessageAck.o \
$(OUTDIR)/activemq/command/MessageDispatch.o \
$(OUTDIR)/activemq/command/MessageDispatchNotification.o \
$(OUTDIR)/activemq/command/MessageId.o \
$(OUTDIR)/activemq/command/NetworkBridgeFilter.o \
$(OUTDIR)/activemq/command/PartialCommand.o \
$(OUTDIR)/activemq/command/ProducerId.o \
$(OUTDIR)/activemq/command/ProducerInfo.o \
$(OUTDIR)/activemq/command/RemoveInfo.o \
$(OUTDIR)/activemq/command/RemoveSubscriptionInfo.o \
$(OUTDIR)/activemq/command/ReplayCommand.o \
$(OUTDIR)/activemq/command/Response.o \
$(OUTDIR)/activemq/command/SessionId.o \
$(OUTDIR)/activemq/command/SessionInfo.o \
@ -68,7 +76,6 @@ LIBOFILES = \
$(OUTDIR)/activemq/command/TransactionInfo.o \
$(OUTDIR)/activemq/command/WireFormatInfo.o \
$(OUTDIR)/activemq/command/XATransactionId.o \
$(OUTDIR)/activemq/command/ActiveMQTempDestination.o \
\
$(OUTDIR)/activemq/protocol/openwire/OpenWireMarshaller.o \
$(OUTDIR)/activemq/protocol/openwire/OpenWireProtocol.o \
@ -84,6 +91,10 @@ LIBOFILES = \
\
$(OUTDIR)/cms/CmsException.o \
\
$(OUTDIR)/ppr/io/encoding/AsciiToUTF8Encoder.o \
$(OUTDIR)/ppr/io/encoding/CharsetEncoderRegistry.o \
$(OUTDIR)/ppr/io/BufferedInputStream.o \
$(OUTDIR)/ppr/io/BufferedOutputStream.o \
$(OUTDIR)/ppr/io/ByteArrayInputStream.o \
$(OUTDIR)/ppr/io/ByteArrayOutputStream.o \
$(OUTDIR)/ppr/io/DataInputStream.o \
@ -106,12 +117,16 @@ LIBOFILES = \
OUTLIB = $(OUTDIR)/libactivemq.a
EXEOFILES = \
$(OUTDIR)/TestMain.o \
$(OUTDIR)/TestListener.o \
$(OUTDIR)/TestSuite.o \
$(OUTDIR)/TestSynchQueue.o \
$(OUTDIR)/TestAsynchQueue.o \
$(OUTDIR)/TestAsynchTopic.o \
$(OUTDIR)/TestLocalTXCommit.o \
EXELIBS = -lactivemq -lpthread -lstdc++
OUTEXE = $(OUTDIR)/test
DEFINES =
include $(MAKESUPPORT_HOME)/makefile.cfg
include $(MAKE_HOME)/makefile.cfg

View File

@ -9,6 +9,6 @@ CC = g++ -frtti -g -pthread -DDEBUG -D_DEBUG -D_REENTRANT
LD = g++ -g -frtti -pthread
CCFLAGS = -Wall
LDFLAGS = -luuid
OUTDIR = $(MAKESUPPORT_HOME)/out
OUTDIR = $(MAKE_HOME)/out
ARFLAGS =

View File

@ -9,7 +9,7 @@ CC = g++ -frtti -pthread -O3 -DNDEBUG -D_REENTRANT
LD = g++ -frtti -pthread
CCFLAGS = -Wall
LDFLAGS = -luuid
OUTDIR = $(MAKESUPPORT_HOME)/out
OUTDIR = $(MAKE_HOME)/out
ARFLAGS =

View File

@ -9,6 +9,6 @@ CC = g++ -frtti -g -DDEBUG -D_DEBUG -D_REENTRANT -DMACOSX -Dunix
LD = g++ -g -frtti
CCFLAGS = -Wall
LDFLAGS = -lpthread
OUTDIR = $(MAKESUPPORT_HOME)/out
OUTDIR = $(MAKE_HOME)/out
ARFLAGS =

View File

@ -9,7 +9,7 @@ CC = g++ -frtti -O3 -DNDEBUG -D_REENTRANT -DMACOSX -Dunix
LD = g++ -frtti
CCFLAGS = -Wall
LDFLAGS = -lpthread
OUTDIR = $(MAKESUPPORT_HOME)/out
OUTDIR = $(MAKE_HOME)/out
ARFLAGS =

View File

@ -3,7 +3,7 @@ CURRENT = $(PWD)
# --- select compiler for structure
# ----------------------------------------------------------
include $(MAKESUPPORT_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
include $(MAKE_HOME)/makefile-$(OSTYPE)-$(CONFIG).cfg
# --- set generic commmands
# ----------------------------------------------------------
@ -46,6 +46,11 @@ $(OUTDIR)/%.o: $(SRCDIR)/%.cpp $(SRCDIR)/%.hpp
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) \
$(LOCAL_INCLUDE) -c $<
$(OUTDIR)/%.o: $(TSTDIR)/%.cpp $(TSTDIR)/%.hpp
$(ECHO) " - "$(CC) "'"$<"'"
$(CC) -o $@ $(DEFINES) $(CCFLAGS) -I$(SRCDIR) -I$(TSTDIR) \
$(LOCAL_INCLUDE) -c $<
# --- set generic targets and their handling procedures
# ----------------------------------------------------------
@ -53,28 +58,32 @@ all: default
default: \
prepare \
$(LIBOFILES) \
$(OUTLIB) \
postpare
test: \
prepare \
$(OUTEXE) \
postpare
$(OUTLIB): $(LIBOFILES) $(DEPLIBS)
$(ECHO) " - Creating static library file "$@
$(AR) $(ARFLAGS) $@ $(LIBOFILES)
test: $(OUTLIB)
$(ECHO) " - Creating test executable"
$(CC) $(CFLAGS) -I$(SRCDIR) -c $(SRCDIR)/../../test/cpp/TestMain.cpp $(OBJS) -o $(OUTDIR)/TestMain.o
$(CC) $(CFLAGS) -I$(SRCDIR) -c $(SRCDIR)/../../test/cpp/TestListener.cpp $(OBJS) -o $(OUTDIR)/TestListener.o
$(LD) $(LDFLAGS) -o $(OUTDIR)/$@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
$(OUTEXE): $(OUTLIB) $(EXEOFILES)
$(ECHO) " - Creating test executable file "$(OUTEXE)
$(LD) $(LDFLAGS) -o $@ -L$(OUTDIR) $(EXEOFILES) $(EXELIBS)
clean:
$(ECHO) " - Cleaning up local directory "$(CURRENT)
$(ECHO) " - Removing object files"
$(RM) $(LIBOFILES)
$(RM) $(EXEOFILES)
$(ECHO) " - Removing file "$(OUTLIB)
$(RM) $(OUTLIB)
$(ECHO) " - Removing file "$(TESTMAIN)
$(RM) $(OUTDIR)/test
$(ECHO) " - Removing file "$(OUTEXE)
$(RM) $(OUTEXE)
$(RM) *~ *%
$(RM) #*
$(RM) core
@ -93,6 +102,7 @@ prepare:
$(MD) $(OUTDIR)/cms; \
$(MD) $(OUTDIR)/ppr; \
$(MD) $(OUTDIR)/ppr/io; \
$(MD) $(OUTDIR)/ppr/io/encoding; \
$(MD) $(OUTDIR)/ppr/net; \
$(MD) $(OUTDIR)/ppr/thread; \
$(MD) $(OUTDIR)/ppr/util; \

View File

@ -0,0 +1,209 @@
/*
*
* 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.
*/
package org.apache.activemq.openwire.tool;
import org.codehaus.jam.JClass;
import java.io.File;
/**
*
* @version $Revision: 379824 $
*/
public abstract class OpenWireCppClassesScript extends OpenWireClassesScript {
public Object run() {
filePostFix = getFilePostFix();
if (destDir == null) {
destDir = new File("../openwire-cpp/src/main/cpp/activemq/command");
}
return super.run();
}
protected String getFilePostFix() {
return ".cpp";
}
/**
* Converts the Java type to a C++ type name
*/
public String toCppType(JClass type) {
String name = type.getSimpleName();
if (name.equals("String")) {
return "p<string>";
}
else if (type.isArrayType()) {
if( name.equals("byte[]") )
name = "char[]" ;
else if( name.equals("DataStructure[]") )
name = "IDataStructure[]" ;
return "array<" + name.substring(0, name.length()-2) + ">";
}
else if (name.equals("Throwable") || name.equals("Exception")) {
return "p<BrokerError>";
}
else if (name.equals("ByteSequence")) {
return "array<char>";
}
else if (name.equals("boolean")) {
return "bool";
}
else if (name.equals("long")) {
return "long long";
}
else if (name.equals("byte")) {
return "char";
}
else if( name.equals("Command") || name.equals("DataStructure") ) {
return "p<I" + name + ">" ;
}
else if( !type.isPrimitiveType() ) {
return "p<" + name + ">" ;
}
else {
return name ;
}
}
/**
* Converts the Java type to a C++ default value
*/
public String toCppDefaultValue(JClass type) {
String name = type.getSimpleName();
if ( name.equals("boolean") ) {
return "false";
}
else if (!type.isPrimitiveType()) {
return "NULL";
}
else {
return "0";
}
}
/**
* Converts the Java type to the name of the C++ marshal method
* to be used
*/
public String toMarshalMethodName(JClass type) {
String name = type.getSimpleName();
if (name.equals("String")) {
return "marshalString";
}
else if (type.isArrayType()) {
if ( type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]") )
return "marshalByteArray" ;
else
return "marshalObjectArray" ;
}
else if ( name.equals("ByteSequence") ) {
return "marshalByteArray";
}
else if (name.equals("short") ) {
return "marshalShort";
}
else if (name.equals("int") ) {
return "marshalInt";
}
else if (name.equals("long") ) {
return "marshalLong";
}
else if (name.equals("byte")) {
return "marshalByte";
}
else if (name.equals("double")) {
return "marshalDouble";
}
else if (name.equals("float")) {
return "marshalFloat";
}
else if (name.equals("boolean")) {
return "marshalBoolean";
}
else if( !type.isPrimitiveType() ) {
return "marshalObject" ;
}
else {
return name ;
}
}
/**
* Converts the Java type to the name of the C++ unmarshal method
* to be used
*/
public String toUnmarshalMethodName(JClass type) {
String name = type.getSimpleName();
if (name.equals("String")) {
return "unmarshalString";
}
else if (type.isArrayType()) {
if ( type.getArrayComponentType().isPrimitiveType() && name.equals("byte[]") )
return "unmarshalByteArray" ;
else
return "unmarshalObjectArray" ;
}
else if ( name.equals("ByteSequence") ) {
return "unmarshalByteArray";
}
else if (name.equals("short") ) {
return "unmarshalShort";
}
else if (name.equals("int") ) {
return "unmarshalInt";
}
else if (name.equals("long") ) {
return "unmarshalLong";
}
else if (name.equals("byte")) {
return "unmarshalByte";
}
else if (name.equals("double")) {
return "unmarshalDouble";
}
else if (name.equals("float")) {
return "unmarshalFloat";
}
else if (name.equals("boolean")) {
return "unmarshalBoolean";
}
else if( !type.isPrimitiveType() ) {
return "unmarshalObject" ;
}
else {
return name ;
}
}
/**
* Converts the Java type to a C++ pointer cast
*/
public String toUnmarshalCast(JClass type) {
String name = toCppType(type) ;
if( name.startsWith("p<") )
return "p_cast<" + name.substring(2) ;
else if( name.startsWith("array<") &&
(type.isArrayType() && !type.getArrayComponentType().isPrimitiveType()) &&
!type.getSimpleName().equals("ByteSequence") )
return "array_cast<" + name.substring(6) ;
else
return "" ;
}
}

View File

@ -0,0 +1,30 @@
/**
*
* 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.
*/
package org.apache.activemq.openwire.tool;
/**
*
* @version $Revision: 379734 $
*/
public abstract class OpenWireCppHeadersScript extends OpenWireCppClassesScript {
protected String getFilePostFix() {
return ".hpp";
}
}

View File

@ -0,0 +1,125 @@
/**
*
* 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.
*/
import org.apache.activemq.openwire.tool.OpenWireCppClassesScript
/**
* Generates the C++ commands for the Open Wire Format
*
* @version $Revision$
*/
class GenerateCppClasses extends OpenWireCppClassesScript {
void generateFile(PrintWriter out) {
out << """/*
* 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.
*/
#include "activemq/command/${className}.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for ${className}
*
*
* 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
*
*/
${className}::${className}()
{"""
for (property in properties) {
def value = toCppDefaultValue(property.type)
def propertyName = property.simpleName
def parameterName = decapitalize(propertyName)
out << """
this->${parameterName} = ${value} ;"""
}
out << """
}
${className}::~${className}()
{
}
unsigned char ${className}::getDataStructureType()
{
return ${className}::TYPE ;
}
"""
for (property in properties) {
def type = toCppType(property.type)
def propertyName = property.simpleName
def parameterName = decapitalize(propertyName)
out << """
${type} ${className}::get${propertyName}()
{
return ${parameterName} ;
}
void ${className}::set${propertyName}(${type} ${parameterName})
{
this->${parameterName} = ${parameterName} ;
}
"""
}
out << """
int ${className}::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += ${baseClass}::marshal(marshaller, mode, ostream) ; """
for (property in properties) {
def marshalMethod = toMarshalMethodName(property.type)
def propertyName = decapitalize(property.simpleName)
out << """
size += marshaller->${marshalMethod}(${propertyName}, mode, ostream) ; """
}
out << """
return size ;
}
void ${className}::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
${baseClass}::unmarshal(marshaller, mode, istream) ; """
for (property in properties) {
def cast = toUnmarshalCast(property.type)
def unmarshalMethod = toUnmarshalMethodName(property.type)
def propertyName = decapitalize(property.simpleName)
out << """
${propertyName} = ${cast}(marshaller->${unmarshalMethod}(mode, istream)) ; """
}
out << """
}
"""
}
}

View File

@ -0,0 +1,153 @@
/**
*
* 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.
*/
import org.apache.activemq.openwire.tool.OpenWireCppHeadersScript
/**
* Generates the C++ commands for the Open Wire Format
*
* @version $Revision$
*/
class GenerateCppHeaders extends OpenWireCppHeadersScript {
void generateFile(PrintWriter out) {
out << """/*
* 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.
*/
#ifndef ActiveMQ_${className}_hpp_
#define ActiveMQ_${className}_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
"""
out << """#include "activemq/command/${baseClass}.hpp"
"""
for (property in properties)
{
if( !property.type.isPrimitiveType() &&
property.type.simpleName != "String" &&
property.type.simpleName != "ByteSequence" )
{
def includeName = toCppType(property.type)
if( property.type.isArrayType() )
{
def arrayType = property.type.arrayComponentType ;
if( arrayType.isPrimitiveType() )
continue ;
}
if( includeName.startsWith("array<") )
includeName = includeName.substring(6, includeName.length()-1) ;
else if( includeName.startsWith("p<") )
includeName = includeName.substring(2, includeName.length()-1)
if( includeName.equals("IDataStructure") )
out << """#include "activemq/${includeName}.hpp"
"""
else
out << """#include "activemq/command/${includeName}.hpp"
"""
}
}
out << """
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for ${className}
*
*
* 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
*
*/
class ${className} : public ${baseClass}
{
protected:
"""
for (property in properties) {
def type = toCppType(property.type)
def name = decapitalize(property.simpleName)
out << """ $type $name ;
"""
}
out << """
public:
const static unsigned char TYPE = ${getOpenWireOpCode(jclass)};
public:
${className}() ;
virtual ~${className}() ;
virtual unsigned char getDataStructureType() ;
"""
for (property in properties) {
def type = toCppType(property.type)
def propertyName = property.simpleName
def parameterName = decapitalize(propertyName)
out << """
virtual ${type} get${propertyName}() ;
virtual void set${propertyName}(${type} ${parameterName}) ;
"""
}
out << """
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_${className}_hpp_*/
"""
}
}

View File

@ -206,7 +206,7 @@ p<ISession> Connection::createSession(AcknowledgementMode ackMode) throw(CmsExce
/*
* Performs a synchronous request-response with the broker.
*/
p<Response> Connection::syncRequest(p<ICommand> command) throw(CmsException)
p<Response> Connection::syncRequest(p<BaseCommand> command) throw(CmsException)
{
checkConnected() ;
@ -233,7 +233,7 @@ p<Response> Connection::syncRequest(p<ICommand> command) throw(CmsException)
/*
*
*/
void Connection::oneway(p<ICommand> command) throw(CmsException)
void Connection::oneway(p<BaseCommand> command) throw(CmsException)
{
checkConnected() ;
transport->oneway(command) ;
@ -247,6 +247,35 @@ void Connection::disposeOf(p<IDataStructure> dataStructure) throw(CmsException)
p<RemoveInfo> command = new RemoveInfo() ;
command->setObjectId( dataStructure ) ;
syncRequest(command) ;
//
// Delete session from internal list if a session id was supplied
// Note! Dispose of sessions should only be invoked from Session.close()
//
if( dataStructure->getDataStructureType() == SessionId::TYPE )
{
list< p<ISession> >::iterator tempIter ;
p<SessionId> sessionId ;
// Convert data structure to a session id
sessionId = p_cast<SessionId> (dataStructure) ;
// Iterate through all sessions and check for a match on the session id
for( tempIter = sessions.begin() ;
tempIter != sessions.end() ;
tempIter++ )
{
p<Session> session = p_cast<Session> (*tempIter) ;
// Do we have a session id match?
if( session->getSessionId()->getValue() == sessionId->getValue() )
{
// Remove session
sessions.remove(session) ;
break ;
}
}
}
}
/*
@ -332,7 +361,7 @@ void Connection::checkConnected() throw(CmsException)
/*
* Handle incoming commands.
*/
void Connection::onCommand(p<ITransport> transport, p<ICommand> command)
void Connection::onCommand(p<ITransport> transport, p<BaseCommand> command)
{
if( command->getDataStructureType() == MessageDispatch::TYPE )
{

View File

@ -102,8 +102,8 @@ public:
// Operation methods
virtual p<ISession> createSession() throw(CmsException) ;
virtual p<ISession> createSession(AcknowledgementMode mode) throw(CmsException) ;
virtual p<Response> syncRequest(p<ICommand> command) throw(CmsException) ;
virtual void oneway(p<ICommand> command) throw(CmsException) ;
virtual p<Response> syncRequest(p<BaseCommand> command) throw(CmsException) ;
virtual void oneway(p<BaseCommand> command) throw(CmsException) ;
virtual void disposeOf(p<IDataStructure> dataStructure) throw(CmsException) ;
virtual p<string> createTemporaryDestinationName() ;
virtual p<LocalTransactionId> createLocalTransactionId() ;
@ -113,7 +113,7 @@ protected:
// Implementation methods
p<SessionInfo> createSessionInfo(AcknowledgementMode mode) ;
void checkConnected() throw(CmsException) ;
void onCommand(p<ITransport> transport, p<ICommand> command) ;
void onCommand(p<ITransport> transport, p<BaseCommand> command) ;
void onError(p<ITransport> transport, exception& error) ;
} ;

View File

@ -27,7 +27,7 @@ using namespace apache::activemq;
ConnectionFactory::ConnectionFactory()
{
// Use default URI
brokerUri = new Uri ("tcp://localhost:61616?wireFormat=openwire") ;
brokerUri = new Uri ("tcp://localhost:61616") ;
username = NULL ;
password = NULL ;
clientId = Guid::getGuidString() ;

View File

@ -17,17 +17,18 @@
#ifndef ActiveMQ_ICommand_hpp_
#define ActiveMQ_ICommand_hpp_
#include "activemq/IDataStructure.hpp"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
using namespace ifr;
/*
* An OpenWire command
*/
struct ICommand : IDataStructure
struct ICommand : Interface
{
virtual int getCommandId() = 0;
virtual void setCommandId(int value) = 0;

View File

@ -39,7 +39,6 @@ namespace apache
struct IDataStructure : Interface
{
virtual unsigned char getDataStructureType() = 0 ;
virtual bool isMarshallAware() = 0 ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) = 0 ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) = 0 ;
} ;

View File

@ -162,10 +162,11 @@ void MessageConsumer::dispatchAsyncMessages()
if( message != NULL )
{
listener->onMessage(message) ;
// Auto acknowledge message if selected
autoAcknowledge(message) ;
// Let listener process message
listener->onMessage(message) ;
}
else
break ;

View File

@ -421,6 +421,11 @@ void Session::close()
map<long long, p<MessageConsumer> >::iterator consumerIter ;
map<long long, p<MessageProducer> >::iterator producerIter ;
// Shutdown dispatch thread
dispatchThread->interrupt() ;
dispatchThread->join() ;
dispatchThread = NULL ;
// Iterate through all consumers and close them down
for( consumerIter = consumers.begin() ;
consumerIter != consumers.end() ;
@ -438,12 +443,13 @@ void Session::close()
producerIter->second->close() ;
producerIter->second = NULL ;
}
// De-register session from broker
// De-register session from broker/connection
connection->disposeOf( sessionInfo->getSessionId() ) ;
// Clean up
connection = NULL ;
closed = true ;
}
}

View File

@ -134,6 +134,7 @@ public:
void interrupt()
{
interrupted = true ;
wakeup() ;
}
void wakeup()
@ -144,13 +145,19 @@ public:
protected:
virtual void run () throw (p<exception>)
{
while( !interrupted )
do
{
// Wait for wake-up call
semaphore.wait() ;
if( interrupted )
break ;
session->dispatchAsyncMessages() ;
}
} while( !interrupted ) ;
// Clean up (prevent cyclic dependency)
session = NULL ;
}
} ;

View File

@ -24,8 +24,10 @@ using namespace apache::activemq::command;
*/
ActiveMQBytesMessage::ActiveMQBytesMessage()
{
this->in = NULL ;
this->out = new ByteArrayOutputStream() ;
this->bis = NULL ;
this->bos = new ByteArrayOutputStream() ;
this->dis = NULL ;
this->dos = new DataOutputStream( bos ) ;
this->readMode = false ;
}
@ -38,8 +40,10 @@ ActiveMQBytesMessage::ActiveMQBytesMessage(char* body, int size)
array<char> buffer = array<char> (size) ;
memcpy(buffer.c_array(), body, size);
this->in = NULL ;
this->out = new ByteArrayOutputStream(buffer) ;
this->bis = NULL ;
this->bos = new ByteArrayOutputStream(buffer) ;
this->dis = NULL ;
this->dos = new DataOutputStream( bos ) ;
this->readMode = false ;
}
@ -63,10 +67,20 @@ unsigned char ActiveMQBytesMessage::getDataStructureType()
*/
void ActiveMQBytesMessage::reset()
{
if( !readMode )
if( readMode )
{
this->in = new ByteArrayInputStream( out->toArray() ) ;
this->out = NULL ;
this->bos = new ByteArrayOutputStream( bis->toArray() ) ;
this->bis = NULL ;
this->dos = new DataOutputStream( bos ) ;
this->dis = NULL ;
this->readMode = false ;
}
else
{
this->bis = new ByteArrayInputStream( bos->toArray() ) ;
this->bos = NULL ;
this->dis = new DataInputStream( bis ) ;
this->dos = NULL ;
this->readMode = true ;
}
}
@ -83,7 +97,7 @@ char ActiveMQBytesMessage::readByte() throw(MessageNotReadableException, Message
try
{
// Read a single byte
return readByte() ;
return dis->readByte() ;
}
catch( EOFException eof )
{
@ -94,7 +108,7 @@ char ActiveMQBytesMessage::readByte() throw(MessageNotReadableException, Message
/*
*
*/
int ActiveMQBytesMessage::readBytes(char* buffer, int index, int length) throw (MessageNotReadableException, MessageEOFException)
int ActiveMQBytesMessage::readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException)
{
// Assert read mode
if( !readMode )
@ -103,7 +117,7 @@ int ActiveMQBytesMessage::readBytes(char* buffer, int index, int length) throw (
try
{
// Read some bytes
return in->read(buffer, index, length) ;
return dis->read(buffer, offset, length) ;
}
catch( EOFException eof )
{
@ -123,7 +137,7 @@ bool ActiveMQBytesMessage::readBoolean() throw(MessageNotReadableException, Mess
try
{
// Read a boolean
return in->readBoolean() ;
return dis->readBoolean() ;
}
catch( EOFException eof )
{
@ -143,7 +157,7 @@ double ActiveMQBytesMessage::readDouble() throw(MessageNotReadableException, Mes
try
{
// Read a double
return in->readDouble() ;
return dis->readDouble() ;
}
catch( EOFException eof )
{
@ -163,7 +177,7 @@ float ActiveMQBytesMessage::readFloat() throw(MessageNotReadableException, Messa
try
{
// Read a float
return in->readFloat() ;
return dis->readFloat() ;
}
catch( EOFException eof )
{
@ -183,7 +197,7 @@ short ActiveMQBytesMessage::readShort() throw(MessageNotReadableException, Messa
try
{
// Read a short
return in->readShort() ;
return dis->readShort() ;
}
catch( EOFException eof )
{
@ -203,7 +217,7 @@ int ActiveMQBytesMessage::readInt() throw(MessageNotReadableException, MessageEO
try
{
// Read an integer
return in->readInt() ;
return dis->readInt() ;
}
catch( EOFException eof )
{
@ -223,7 +237,7 @@ long long ActiveMQBytesMessage::readLong() throw(MessageNotReadableException, Me
try
{
// Read a long long
return in->readLong() ;
return dis->readLong() ;
}
catch( EOFException eof )
{
@ -234,7 +248,7 @@ long long ActiveMQBytesMessage::readLong() throw(MessageNotReadableException, Me
/*
*
*/
p<string> ActiveMQBytesMessage::readUTF() throw(MessageNotReadableException, MessageEOFException)
p<string> ActiveMQBytesMessage::readString() throw(MessageNotReadableException, MessageEOFException)
{
// Assert read mode
if( !readMode )
@ -243,7 +257,7 @@ p<string> ActiveMQBytesMessage::readUTF() throw(MessageNotReadableException, Mes
try
{
// Read a string
return in->readString() ;
return dis->readString() ;
}
catch( EOFException eof )
{
@ -261,20 +275,20 @@ void ActiveMQBytesMessage::writeByte(char value) throw (MessageNotWritableExcept
throw MessageNotWritableException() ;
// Write a single byte
out->writeByte(value) ;
dos->writeByte(value) ;
}
/*
*
*/
void ActiveMQBytesMessage::writeBytes(char* value, int index, int length) throw (MessageNotWritableException)
void ActiveMQBytesMessage::writeBytes(char* value, int offset, int length) throw (MessageNotWritableException)
{
// Assert write mode
if( readMode )
throw MessageNotWritableException() ;
// Write some bytes
out->write(value, index, length) ;
dos->write(value, offset, length) ;
}
/*
@ -287,7 +301,7 @@ void ActiveMQBytesMessage::writeBoolean(bool value) throw (MessageNotWritableExc
throw MessageNotWritableException() ;
// Write a boolean
out->writeBoolean(value) ;
dos->writeBoolean(value) ;
}
/*
@ -300,7 +314,7 @@ void ActiveMQBytesMessage::writeDouble(double value) throw (MessageNotWritableEx
throw MessageNotWritableException() ;
// Write a double
out->writeDouble(value) ;
dos->writeDouble(value) ;
}
/*
@ -313,7 +327,7 @@ void ActiveMQBytesMessage::writeFloat(float value) throw (MessageNotWritableExce
throw MessageNotWritableException() ;
// Write a float
out->writeFloat(value) ;
dos->writeFloat(value) ;
}
/*
@ -326,7 +340,7 @@ void ActiveMQBytesMessage::writeInt(int value) throw (MessageNotWritableExceptio
throw MessageNotWritableException() ;
// Write an integer
out->writeInt(value) ;
dos->writeInt(value) ;
}
/*
@ -339,7 +353,7 @@ void ActiveMQBytesMessage::writeLong(long long value) throw (MessageNotWritableE
throw MessageNotWritableException() ;
// Write a long long
out->writeLong(value) ;
dos->writeLong(value) ;
}
/*
@ -352,13 +366,13 @@ void ActiveMQBytesMessage::writeShort(short value) throw (MessageNotWritableExce
throw MessageNotWritableException() ;
// Write a short
out->writeShort(value) ;
dos->writeShort(value) ;
}
/*
*
*/
void ActiveMQBytesMessage::writeUTF(const char* value) throw (MessageNotWritableException)
void ActiveMQBytesMessage::writeString(const char* value) throw (MessageNotWritableException)
{
// Assert write mode
if( readMode )
@ -366,22 +380,22 @@ void ActiveMQBytesMessage::writeUTF(const char* value) throw (MessageNotWritable
// Write a string
p<string> v = new string(value) ;
out->writeString(v) ;
dos->writeString(v) ;
}
/*
*
*/
int ActiveMQBytesMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ActiveMQBytesMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
// Copy body to message content container
if( mode == IMarshaller::MARSHAL_SIZE )
this->content = ( readMode) ? in->toArray() : out->toArray() ;
this->content = ( readMode) ? bis->toArray() : bos->toArray() ;
// size += (int)this->content.size() ;
size += ActiveMQMessage::marshal(marshaller, mode, writer) ;
size += ActiveMQMessage::marshal(marshaller, mode, ostream) ;
// Note! Message content marshalling is done in super class
@ -391,16 +405,18 @@ int ActiveMQBytesMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutput
/*
*
*/
void ActiveMQBytesMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ActiveMQBytesMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
// Note! Message content unmarshalling is done in super class
ActiveMQMessage::unmarshal(marshaller, mode, reader) ;
ActiveMQMessage::unmarshal(marshaller, mode, istream) ;
// Copy body to message content holder
if( mode == IMarshaller::MARSHAL_READ )
{
in = new ByteArrayInputStream( this->content ) ;
out = NULL ;
bis = new ByteArrayInputStream( this->content ) ;
bos = NULL ;
dis = new DataInputStream( bis ) ;
dos = NULL ;
readMode = true ;
}
}

View File

@ -30,6 +30,8 @@
#include "activemq/command/ActiveMQMessage.hpp"
#include "ppr/io/ByteArrayInputStream.hpp"
#include "ppr/io/ByteArrayOutputStream.hpp"
#include "ppr/io/DataInputStream.hpp"
#include "ppr/io/DataOutputStream.hpp"
#include "ppr/io/EOFException.hpp"
#include "ppr/util/Endian.hpp"
#include "ppr/util/MapItemHolder.hpp"
@ -53,8 +55,10 @@ namespace apache
class ActiveMQBytesMessage : public ActiveMQMessage , public IBytesMessage
{
private:
p<ByteArrayInputStream> in ;
p<ByteArrayOutputStream> out ;
p<DataInputStream> dis ;
p<DataOutputStream> dos ;
p<ByteArrayInputStream> bis ;
p<ByteArrayOutputStream> bos ;
bool readMode ;
const static int INITIAL_SIZE = 256 ;
@ -72,23 +76,23 @@ public:
virtual void reset() ;
virtual char readByte() throw (MessageNotReadableException, MessageEOFException) ;
virtual int readBytes(char* buffer, int index, int length) throw (MessageNotReadableException, MessageEOFException) ;
virtual int readBytes(char* buffer, int offset, int length) throw (MessageNotReadableException, MessageEOFException) ;
virtual bool readBoolean() throw (MessageNotReadableException, MessageEOFException) ;
virtual double readDouble() throw (MessageNotReadableException, MessageEOFException) ;
virtual float readFloat() throw (MessageNotReadableException, MessageEOFException) ;
virtual int readInt() throw (MessageNotReadableException, MessageEOFException) ;
virtual long long readLong() throw (MessageNotReadableException, MessageEOFException) ;
virtual short readShort() throw (MessageNotReadableException, MessageEOFException) ;
virtual p<string> readUTF() throw (MessageNotReadableException, MessageEOFException) ;
virtual p<string> readString() throw (MessageNotReadableException, MessageEOFException) ;
virtual void writeBoolean(bool value) throw (MessageNotWritableException) ;
virtual void writeByte(char value) throw (MessageNotWritableException) ;
virtual void writeBytes(char* value, int index, int length) throw (MessageNotWritableException) ;
virtual void writeBytes(char* value, int offset, int length) throw (MessageNotWritableException) ;
virtual void writeDouble(double value) throw (MessageNotWritableException) ;
virtual void writeFloat(float value) throw (MessageNotWritableException) ;
virtual void writeInt(int value) throw (MessageNotWritableException) ;
virtual void writeLong(long long value) throw (MessageNotWritableException) ;
virtual void writeShort(short value) throw (MessageNotWritableException) ;
virtual void writeUTF(const char* value) throw (MessageNotWritableException) ;
virtual void writeString(const char* value) throw (MessageNotWritableException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;

View File

@ -347,18 +347,18 @@ p<string> ActiveMQDestination::getClientId(p<ActiveMQDestination> destination)
/*
*
*/
int ActiveMQDestination::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ActiveMQDestination::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalString(physicalName, mode, writer) ;
size += marshaller->marshalString(physicalName, mode, ostream) ;
return size ;
}
/*
*
*/
void ActiveMQDestination::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ActiveMQDestination::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
physicalName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
physicalName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -23,7 +23,7 @@
#include "cms/IQueue.hpp"
#include "cms/ITemporaryTopic.hpp"
#include "cms/ITemporaryQueue.hpp"
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -49,7 +49,7 @@ namespace apache
/*
*
*/
class ActiveMQDestination : public AbstractCommand, public IDestination
class ActiveMQDestination : public BaseCommand, public IDestination
{
private:
p<string> orderedTarget,
@ -109,8 +109,8 @@ public:
virtual bool isWildcard() ;
virtual p<string> toString() ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
//
// Abstract methods

View File

@ -15,8 +15,11 @@
* limitations under the License.
*/
#include "activemq/command/ActiveMQMapMessage.hpp"
#include "ppr/io/ByteArrayOutputStream.hpp"
#include "ppr/io/ByteArrayInputStream.hpp"
#include "ppr/io/DataOutputStream.hpp"
#include "ppr/io/DataInputStream.hpp"
using namespace apache::activemq::command;
@ -411,7 +414,7 @@ p<string> ActiveMQMapMessage::getString(const char* name) throw (MessageFormatEx
/*
*
*/
void ActiveMQMapMessage::setString(const char* name, p<string> value) throw (IllegalArgumentException)
void ActiveMQMapMessage::setString(const char* name, const char* value) throw (IllegalArgumentException)
{
// Assert arguments
if( name == NULL || strcmp(name, "") == 0 )
@ -455,23 +458,24 @@ bool ActiveMQMapMessage::itemExists(const char* name)
/*
*
*/
int ActiveMQMapMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ActiveMQMapMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
// Update message content
// Update message content during size lookup
if( mode == IMarshaller::MARSHAL_SIZE )
{
p<ByteArrayOutputStream> arrayWriter = new ByteArrayOutputStream() ;
p<ByteArrayOutputStream> bos = new ByteArrayOutputStream() ;
p<DataOutputStream> dos = new DataOutputStream( bos ) ;
// Marshal map into a byte array
marshaller->marshalMap(contentMap, mode, arrayWriter) ;
marshaller->marshalMap(contentMap, IMarshaller::MARSHAL_WRITE, dos) ;
// Store map byte array in message content
this->content = arrayWriter->toArray() ;
this->content = bos->toArray() ;
}
// Note! Message content marshalling is done in super class
size += ActiveMQMessage::marshal(marshaller, mode, writer) ;
size += ActiveMQMessage::marshal(marshaller, mode, ostream) ;
return size ;
}
@ -479,17 +483,18 @@ int ActiveMQMapMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputSt
/*
*
*/
void ActiveMQMapMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ActiveMQMapMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
// Note! Message content unmarshalling is done in super class
ActiveMQMessage::unmarshal(marshaller, mode, reader) ;
ActiveMQMessage::unmarshal(marshaller, mode, istream) ;
// Extract map from message content
if( mode == IMarshaller::MARSHAL_READ )
{
p<ByteArrayInputStream> arrayReader = new ByteArrayInputStream( this->content ) ;
p<ByteArrayInputStream> bis = new ByteArrayInputStream( this->content ) ;
p<DataInputStream> dis = new DataInputStream( bis ) ;
// Unmarshal map into a map
contentMap = marshaller->unmarshalMap(mode, arrayReader) ;
contentMap = marshaller->unmarshalMap(mode, dis) ;
}
}

View File

@ -83,12 +83,12 @@ public:
virtual short getShort(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
virtual void setShort(const char* name, short value) throw (IllegalArgumentException) ;
virtual p<string> getString(const char* name) throw (MessageFormatException, IllegalArgumentException) ;
virtual void setString(const char* name, p<string> value) throw (IllegalArgumentException) ;
virtual void setString(const char* name, const char* value) throw (IllegalArgumentException) ;
virtual array<string> getMapNames() ;
virtual bool itemExists(const char* name) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
//
// The methods below are needed to resolve the multiple

View File

@ -15,8 +15,11 @@
* limitations under the License.
*/
#include "activemq/command/ActiveMQMessage.hpp"
#include "ppr/io/ByteArrayOutputStream.hpp"
#include "ppr/io/ByteArrayInputStream.hpp"
#include "ppr/io/DataOutputStream.hpp"
#include "ppr/io/DataInputStream.hpp"
using namespace apache::activemq::command;
@ -320,23 +323,24 @@ void ActiveMQMessage::acknowledge()
/*
*
*/
int ActiveMQMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException)
int ActiveMQMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
{
int size = 0 ;
// Update message content if available
if( mode == IMarshaller::MARSHAL_SIZE && this->properties != NULL )
{
p<ByteArrayOutputStream> arrayWriter = new ByteArrayOutputStream() ;
p<ByteArrayOutputStream> bos = new ByteArrayOutputStream() ;
p<DataOutputStream> dos = new DataOutputStream( bos ) ;
// Marshal properties into a byte array
marshaller->marshalMap(properties, IMarshaller::MARSHAL_WRITE, arrayWriter) ;
marshaller->marshalMap(properties, IMarshaller::MARSHAL_WRITE, dos) ;
// Store properties byte array in message content
this->marshalledProperties = arrayWriter->toArray() ;
this->marshalledProperties = bos->toArray() ;
}
// Note! Message propertys marshalling is done in super class
size += Message::marshal(marshaller, mode, writer) ;
size += Message::marshal(marshaller, mode, ostream) ;
return size ;
}
@ -344,31 +348,21 @@ int ActiveMQMessage::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStrea
/*
*
*/
void ActiveMQMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException)
void ActiveMQMessage::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
{
// Note! Message property unmarshalling is done in super class
Message::unmarshal(marshaller, mode, reader) ;
Message::unmarshal(marshaller, mode, istream) ;
// Extract properties from message
if( mode == IMarshaller::MARSHAL_READ )
{
if( this->marshalledProperties != NULL )
{
p<ByteArrayInputStream> arrayReader = new ByteArrayInputStream( this->marshalledProperties ) ;
p<ByteArrayInputStream> bis = new ByteArrayInputStream( this->marshalledProperties ) ;
p<DataInputStream> dis = new DataInputStream( bis ) ;
// Unmarshal map into a map
properties = marshaller->unmarshalMap(mode, arrayReader) ;
properties = marshaller->unmarshalMap(mode, dis) ;
}
}
}
// Static methods ---------------------------------------------------
/*
*
*/
/*p<ActiveMQMessage> ActiveMQMessage::transform(p<IMessage> message)
{
return p_cast<ActiveMQMessage> (message) ;
}*/

View File

@ -88,12 +88,8 @@ public:
protected:
// Implementation
int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException) ;
void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException) ;
public:
// Static methods
//static p<ActiveMQMessage> transform(p<IMessage> message) ;
int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
} ;
/* namespace */

View File

@ -23,6 +23,7 @@ using namespace apache::activemq::command;
*/
ActiveMQTextMessage::ActiveMQTextMessage()
{
encoder = CharsetEncoderRegistry::getEncoder() ;
setText(NULL) ;
}
@ -31,6 +32,16 @@ ActiveMQTextMessage::ActiveMQTextMessage()
*/
ActiveMQTextMessage::ActiveMQTextMessage(const char* text)
{
encoder = CharsetEncoderRegistry::getEncoder() ;
setText(text) ;
}
/*
*
*/
ActiveMQTextMessage::ActiveMQTextMessage(const char* text, const char* encname)
{
encoder = CharsetEncoderRegistry::getEncoder(encname) ;
setText(text) ;
}
@ -57,17 +68,16 @@ p<string> ActiveMQTextMessage::getText()
// Extract text from message content
if( this->content.size() > 0 )
{
int utflen = 0 ;
char* buffer = this->content.c_array() ;
p<string> value ;
// TODO: assuming that the text is ASCII
utflen |= (char) ((buffer[0] << 24) & 0xFF) ;
utflen |= (char) ((buffer[1] >> 16) & 0xFF);
utflen |= (char) ((buffer[2] >> 8) & 0xFF);
utflen |= (char) ((buffer[3] >> 0) & 0xFF);
// Use undecoded string, skip string length
value = new string( this->content.c_array() + sizeof(int), this->content.size() - sizeof(int) ) ;
p<string> text = new string( buffer + 4, this->content.size() - 4 ) ;
return text ;
// Decode string if an encoder has been set up
if( encoder != NULL )
value = encoder->decode( value ) ;
return value ;
}
return NULL ;
}
@ -79,19 +89,32 @@ void ActiveMQTextMessage::setText(const char* text)
{
if( text != NULL )
{
int length = (int)strlen(text) ;
int utflen = length ;
p<DataOutputStream> dos ;
p<ByteArrayOutputStream> bos ;
p<string> value ;
int length ;
// TODO: assuming that the text is ASCII
this->content = array<char> (length + 4) ;
// Set up in-memory streams
bos = new ByteArrayOutputStream() ;
dos = new DataOutputStream( bos ) ;
this->content[0] = (char) ((utflen >> 24) & 0xFF) ;
this->content[1] = (char) ((utflen >> 16) & 0xFF);
this->content[2] = (char) ((utflen >> 8) & 0xFF);
this->content[3] = (char) ((utflen >> 0) & 0xFF);
// Encode string if an encoder has been set up
if( encoder != NULL )
{
// Encode string
value = encoder->encode( p<string> (new string(text)), &length) ;
}
else // ...use unencoded string
{
length = (int)strlen(text) ;
value = new string(text) ;
}
// Prepend data with the string length (4 bytes)
dos->writeInt( length ) ;
dos->write( value->c_str(), 0, length ) ;
for( int i = 0 ; i < length ; i++ )
this->content[4+i] = text[i] ;
// Finally, store text in content holder
this->content = bos->toArray() ;
}
else
this->content = NULL ;

View File

@ -20,6 +20,10 @@
#include <string>
#include "cms/ITextMessage.hpp"
#include "activemq/command/ActiveMQMessage.hpp"
#include "ppr/io/ByteArrayOutputStream.hpp"
#include "ppr/io/DataOutputStream.hpp"
#include "ppr/io/encoding/ICharsetEncoder.hpp"
#include "ppr/io/encoding/CharsetEncoderRegistry.hpp"
#include "ppr/util/MapItemHolder.hpp"
#include "ppr/util/ifr/p"
@ -31,6 +35,8 @@ namespace apache
{
using namespace ifr;
using namespace apache::cms;
using namespace apache::ppr::io;
using namespace apache::ppr::io::encoding;
using namespace apache::ppr::util;
/*
@ -38,12 +44,16 @@ namespace apache
*/
class ActiveMQTextMessage : public ActiveMQMessage, public ITextMessage
{
private:
p<ICharsetEncoder> encoder ;
public:
const static unsigned char TYPE = 28 ;
public:
ActiveMQTextMessage() ;
ActiveMQTextMessage(const char* text) ;
ActiveMQTextMessage(const char* text, const char* encname) ;
virtual ~ActiveMQTextMessage() ;
virtual unsigned char getDataStructureType() ;

View File

@ -21,17 +21,77 @@ using namespace apache::activemq::command;
// Attribute methods ------------------------------------------------
/*
*
*/
int BaseCommand::getCommandId()
{
return commandId ;
}
/*
*
*/
void BaseCommand::setCommandId(int id)
{
commandId = id ;
}
/*
*
*/
bool BaseCommand::getResponseRequired()
{
return responseRequired ;
}
/*
*
*/
void BaseCommand::setResponseRequired(bool value)
{
responseRequired = value ;
}
/*
*
*/
int BaseCommand::getHashCode()
{
return ( commandId * 38 ) + getDataStructureType() ;
return ( commandId * 38 ) + BaseDataStructure::getDataStructureType() ;
}
// Operation methods ------------------------------------------------
/*
*
*/
int BaseCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, ostream) ;
size += marshaller->marshalBoolean(responseRequired, mode, ostream) ;
return size ;
}
/*
*
*/
void BaseCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
{
commandId = marshaller->unmarshalInt(mode, istream) ;
responseRequired = marshaller->unmarshalBoolean(mode, istream) ;
}
/*
*
*/
bool BaseCommand::operator== (BaseCommand& that)
{
if( this->getDataStructureType() == that.getDataStructureType() &&
if( BaseDataStructure::getDataStructureType() == ((BaseDataStructure)that).getDataStructureType() &&
this->commandId == that.commandId )
{
return true ;
@ -39,12 +99,15 @@ bool BaseCommand::operator== (BaseCommand& that)
return false ;
}
/*
*
*/
p<string> BaseCommand::toString()
{
p<string> str = new string() ;
char buffer[10] ;
str->assign( getDataStructureTypeAsString( getDataStructureType() )->c_str() ) ;
str->assign( BaseDataStructure::getDataStructureTypeAsString( BaseDataStructure::getDataStructureType() )->c_str() ) ;
if( str->length() == 0 )
str->assign("") ;

View File

@ -18,7 +18,12 @@
#define ActiveMQ_BaseCommand_hpp_
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/ICommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/p"
namespace apache
@ -29,13 +34,28 @@ namespace apache
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
*/
class BaseCommand : public AbstractCommand
class BaseCommand : public BaseDataStructure, public ICommand
{
protected:
int commandId ;
bool responseRequired ;
public:
virtual int getCommandId() ;
virtual void setCommandId(int id) ;
virtual bool getResponseRequired() ;
virtual void setResponseRequired(bool value) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
// Equals operator
bool operator== (BaseCommand& other) ;

View File

@ -15,7 +15,8 @@
* limitations under the License.
*/
#include <string.h>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/ActiveMQMessage.hpp"
#include "activemq/command/ActiveMQBytesMessage.hpp"
#include "activemq/command/ActiveMQMapMessage.hpp"
@ -23,6 +24,11 @@
#include "activemq/command/ActiveMQStreamMessage.hpp"
#include "activemq/command/ActiveMQTextMessage.hpp"
#include "activemq/command/ActiveMQQueue.hpp"
#include "activemq/command/ActiveMQTopic.hpp"
#include "activemq/command/ActiveMQTempQueue.hpp"
#include "activemq/command/ActiveMQTempTopic.hpp"
#include "activemq/command/ExceptionResponse.hpp"
#include "activemq/command/ConnectionId.hpp"
#include "activemq/command/ConsumerId.hpp"
#include "activemq/command/ProducerId.hpp"
#include "activemq/command/MessageId.hpp"
@ -49,39 +55,7 @@ using namespace apache::activemq::command;
/*
*
*/
int AbstractCommand::getCommandId()
{
return commandId ;
}
/*
*
*/
void AbstractCommand::setCommandId(int id)
{
commandId = id ;
}
/*
*
*/
bool AbstractCommand::getResponseRequired()
{
return responseRequired ;
}
/*
*
*/
void AbstractCommand::setResponseRequired(bool value)
{
responseRequired = value ;
}
/*
*
*/
unsigned char AbstractCommand::getDataStructureType()
unsigned char BaseDataStructure::getDataStructureType()
{
return 0 ;
}
@ -89,15 +63,7 @@ unsigned char AbstractCommand::getDataStructureType()
/*
*
*/
bool AbstractCommand::isMarshallAware()
{
return false ;
}
/*
*
*/
int AbstractCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException)
int BaseDataStructure::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException)
{
return 0 ;
}
@ -105,14 +71,14 @@ int AbstractCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStrea
/*
*
*/
void AbstractCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException)
void BaseDataStructure::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException)
{
}
/*
*
*/
p<IDataStructure> AbstractCommand::createObject(unsigned char type)
p<IDataStructure> BaseDataStructure::createObject(unsigned char type)
{
switch( type )
{
@ -130,6 +96,16 @@ p<IDataStructure> AbstractCommand::createObject(unsigned char type)
return new ActiveMQMapMessage() ;
case ActiveMQQueue::TYPE:
return new ActiveMQQueue() ;
case ActiveMQTopic::TYPE:
return new ActiveMQTopic() ;
case ActiveMQTempQueue::TYPE:
return new ActiveMQTempQueue() ;
case ActiveMQTempTopic::TYPE:
return new ActiveMQTempTopic() ;
case ExceptionResponse::TYPE:
return new ExceptionResponse() ;
case ConnectionId::TYPE:
return new ConnectionId() ;
case ConsumerId::TYPE:
return new ConsumerId() ;
case ProducerId::TYPE:
@ -178,7 +154,7 @@ p<IDataStructure> AbstractCommand::createObject(unsigned char type)
/*
*
*/
p<string> AbstractCommand::getDataStructureTypeAsString(unsigned char type)
p<string> BaseDataStructure::getDataStructureTypeAsString(unsigned char type)
{
p<string> packetType = new string() ;
@ -205,6 +181,12 @@ p<string> AbstractCommand::getDataStructureTypeAsString(unsigned char type)
case ActiveMQQueue::TYPE:
packetType->assign("ACTIVEMQ_QUEUE") ;
break ;
case ActiveMQTopic::TYPE:
packetType->assign("ACTIVEMQ_TOPIC") ;
break ;
case ConnectionId::TYPE:
packetType->assign("CONNECTION_ID") ;
break ;
case ConsumerId::TYPE:
packetType->assign("CONSUMER_ID") ;
break ;
@ -226,6 +208,9 @@ p<string> AbstractCommand::getDataStructureTypeAsString(unsigned char type)
case Response::TYPE:
packetType->assign("RESPONSE") ;
break ;
case ExceptionResponse::TYPE:
packetType->assign("EXCEPTION_RESPONSE") ;
break ;
case ConsumerInfo::TYPE:
packetType->assign("CONSUMER_INFO") ;
break ;

View File

@ -14,11 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ActiveMQ_AbstractCommand_hpp_
#define ActiveMQ_AbstractCommand_hpp_
#ifndef ActiveMQ_BaseDataStructure_hpp_
#define ActiveMQ_BaseDataStructure_hpp_
#include <string>
#include "activemq/ICommand.hpp"
#include "activemq/IDataStructure.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -39,24 +38,16 @@ namespace apache
/*
*
*/
class AbstractCommand : public ICommand
class BaseDataStructure : public IDataStructure
{
protected:
int commandId ;
bool responseRequired ;
BaseDataStructure() { } ;
protected:
AbstractCommand() : commandId (0), responseRequired (false) {}
public:
virtual int getCommandId() ;
virtual void setCommandId(int id) ;
virtual bool getResponseRequired() ;
virtual void setResponseRequired(bool value) ;
virtual unsigned char getDataStructureType() ;
virtual bool isMarshallAware() ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw(IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw(IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw(IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw(IOException) ;
static p<IDataStructure> createObject(unsigned char type) ;
static p<string> getDataStructureTypeAsString(unsigned char type) ;
@ -67,4 +58,4 @@ public:
}
}
#endif /*ActiveMQ_AbstractCommand_hpp_*/
#endif /*ActiveMQ_BaseDataStructure_hpp_*/

View File

@ -20,7 +20,7 @@
#include <string>
#include <ostream>
#include <sstream>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseCommand.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
@ -47,7 +47,7 @@ struct StackTraceElement
/*
* Represents an exception on the broker.
*/
class BrokerError : public AbstractCommand
class BrokerError : public BaseCommand
{
private:
p<string> message ;

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for BrokerId
* Command and marshalling code for OpenWire format for BrokerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,15 +53,17 @@ void BrokerId::setValue(p<string> value)
this->value = value ;
}
int BrokerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int BrokerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalString(value, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(value, mode, ostream) ;
return size ;
}
void BrokerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void BrokerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
value = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
value = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for BrokerId
* Command and marshalling code for OpenWire format for BrokerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class BrokerId : public AbstractCommand
class BrokerId : public BaseDataStructure
{
protected:
p<string> value ;
@ -70,8 +71,8 @@ public:
virtual p<string> getValue() ;
virtual void setValue(p<string> value) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for BrokerInfo
* Command and marshalling code for OpenWire format for BrokerInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -35,6 +35,8 @@ BrokerInfo::BrokerInfo()
this->peerBrokerInfos = NULL ;
this->brokerName = NULL ;
this->slaveBroker = false ;
this->masterBroker = false ;
this->faultTolerantConfiguration = false ;
}
BrokerInfo::~BrokerInfo()
@ -101,27 +103,51 @@ void BrokerInfo::setSlaveBroker(bool slaveBroker)
this->slaveBroker = slaveBroker ;
}
int BrokerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
bool BrokerInfo::getMasterBroker()
{
return masterBroker ;
}
void BrokerInfo::setMasterBroker(bool masterBroker)
{
this->masterBroker = masterBroker ;
}
bool BrokerInfo::getFaultTolerantConfiguration()
{
return faultTolerantConfiguration ;
}
void BrokerInfo::setFaultTolerantConfiguration(bool faultTolerantConfiguration)
{
this->faultTolerantConfiguration = faultTolerantConfiguration ;
}
int BrokerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(brokerId, mode, writer) ;
size += marshaller->marshalString(brokerURL, mode, writer) ;
size += marshaller->marshalObjectArray(peerBrokerInfos, mode, writer) ;
size += marshaller->marshalString(brokerName, mode, writer) ;
size += marshaller->marshalBoolean(slaveBroker, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(brokerId, mode, ostream) ;
size += marshaller->marshalString(brokerURL, mode, ostream) ;
size += marshaller->marshalObjectArray(peerBrokerInfos, mode, ostream) ;
size += marshaller->marshalString(brokerName, mode, ostream) ;
size += marshaller->marshalBoolean(slaveBroker, mode, ostream) ;
size += marshaller->marshalBoolean(masterBroker, mode, ostream) ;
size += marshaller->marshalBoolean(faultTolerantConfiguration, mode, ostream) ;
return size ;
}
void BrokerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void BrokerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
brokerId = p_cast<BrokerId>(marshaller->unmarshalObject(mode, reader)) ;
brokerURL = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
peerBrokerInfos = array_cast<BrokerInfo>(marshaller->unmarshalObjectArray(mode, reader)) ;
brokerName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
slaveBroker = (marshaller->unmarshalBoolean(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
brokerId = p_cast<BrokerId>(marshaller->unmarshalObject(mode, istream)) ;
brokerURL = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
peerBrokerInfos = array_cast<BrokerInfo>(marshaller->unmarshalObjectArray(mode, istream)) ;
brokerName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
slaveBroker = (marshaller->unmarshalBoolean(mode, istream)) ;
masterBroker = (marshaller->unmarshalBoolean(mode, istream)) ;
faultTolerantConfiguration = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -26,6 +26,7 @@
#include "activemq/command/BaseCommand.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/command/BrokerInfo.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -47,7 +48,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for BrokerInfo
* Command and marshalling code for OpenWire format for BrokerInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -63,6 +64,8 @@ protected:
array<BrokerInfo> peerBrokerInfos ;
p<string> brokerName ;
bool slaveBroker ;
bool masterBroker ;
bool faultTolerantConfiguration ;
public:
const static unsigned char TYPE = 2;
@ -88,8 +91,14 @@ public:
virtual bool getSlaveBroker() ;
virtual void setSlaveBroker(bool slaveBroker) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual bool getMasterBroker() ;
virtual void setMasterBroker(bool masterBroker) ;
virtual bool getFaultTolerantConfiguration() ;
virtual void setFaultTolerantConfiguration(bool faultTolerantConfiguration) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -0,0 +1,125 @@
/*
* 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.
*/
#include "activemq/command/ConnectionControl.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for ConnectionControl
*
*
* 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
*
*/
ConnectionControl::ConnectionControl()
{
this->close = false ;
this->exit = false ;
this->faultTolerant = false ;
this->resume = false ;
this->suspend = false ;
}
ConnectionControl::~ConnectionControl()
{
}
unsigned char ConnectionControl::getDataStructureType()
{
return ConnectionControl::TYPE ;
}
bool ConnectionControl::getClose()
{
return close ;
}
void ConnectionControl::setClose(bool close)
{
this->close = close ;
}
bool ConnectionControl::getExit()
{
return exit ;
}
void ConnectionControl::setExit(bool exit)
{
this->exit = exit ;
}
bool ConnectionControl::getFaultTolerant()
{
return faultTolerant ;
}
void ConnectionControl::setFaultTolerant(bool faultTolerant)
{
this->faultTolerant = faultTolerant ;
}
bool ConnectionControl::getResume()
{
return resume ;
}
void ConnectionControl::setResume(bool resume)
{
this->resume = resume ;
}
bool ConnectionControl::getSuspend()
{
return suspend ;
}
void ConnectionControl::setSuspend(bool suspend)
{
this->suspend = suspend ;
}
int ConnectionControl::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalBoolean(close, mode, ostream) ;
size += marshaller->marshalBoolean(exit, mode, ostream) ;
size += marshaller->marshalBoolean(faultTolerant, mode, ostream) ;
size += marshaller->marshalBoolean(resume, mode, ostream) ;
size += marshaller->marshalBoolean(suspend, mode, ostream) ;
return size ;
}
void ConnectionControl::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
BaseCommand::unmarshal(marshaller, mode, istream) ;
close = (marshaller->unmarshalBoolean(mode, istream)) ;
exit = (marshaller->unmarshalBoolean(mode, istream)) ;
faultTolerant = (marshaller->unmarshalBoolean(mode, istream)) ;
resume = (marshaller->unmarshalBoolean(mode, istream)) ;
suspend = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -0,0 +1,99 @@
/*
* 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.
*/
#ifndef ActiveMQ_ConnectionControl_hpp_
#define ActiveMQ_ConnectionControl_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
#include "activemq/command/BaseCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for ConnectionControl
*
*
* 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
*
*/
class ConnectionControl : public BaseCommand
{
protected:
bool close ;
bool exit ;
bool faultTolerant ;
bool resume ;
bool suspend ;
public:
const static unsigned char TYPE = 18;
public:
ConnectionControl() ;
virtual ~ConnectionControl() ;
virtual unsigned char getDataStructureType() ;
virtual bool getClose() ;
virtual void setClose(bool close) ;
virtual bool getExit() ;
virtual void setExit(bool exit) ;
virtual bool getFaultTolerant() ;
virtual void setFaultTolerant(bool faultTolerant) ;
virtual bool getResume() ;
virtual void setResume(bool resume) ;
virtual bool getSuspend() ;
virtual void setSuspend(bool suspend) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_ConnectionControl_hpp_*/

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ConnectionError
* Command and marshalling code for OpenWire format for ConnectionError
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -65,21 +65,19 @@ void ConnectionError::setConnectionId(p<ConnectionId> connectionId)
this->connectionId = connectionId ;
}
int ConnectionError::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ConnectionError::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(exception, mode, writer) ;
size += marshaller->marshalObject(connectionId, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(exception, mode, ostream) ;
size += marshaller->marshalObject(connectionId, mode, ostream) ;
return size ;
}
void ConnectionError::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ConnectionError::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, reader)) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, istream)) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -26,6 +26,7 @@
#include "activemq/command/BaseCommand.hpp"
#include "activemq/command/BrokerError.hpp"
#include "activemq/command/ConnectionId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -47,7 +48,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ConnectionError
* Command and marshalling code for OpenWire format for ConnectionError
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -76,8 +77,8 @@ public:
virtual p<ConnectionId> getConnectionId() ;
virtual void setConnectionId(p<ConnectionId> connectionId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ConnectionId
* Command and marshalling code for OpenWire format for ConnectionId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,15 +53,17 @@ void ConnectionId::setValue(p<string> value)
this->value = value ;
}
int ConnectionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ConnectionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalString(value, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(value, mode, ostream) ;
return size ;
}
void ConnectionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ConnectionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
value = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
value = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ConnectionId
* Command and marshalling code for OpenWire format for ConnectionId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class ConnectionId : public AbstractCommand
class ConnectionId : public BaseDataStructure
{
protected:
p<string> value ;
@ -70,8 +71,8 @@ public:
virtual p<string> getValue() ;
virtual void setValue(p<string> value) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ConnectionInfo
* Command and marshalling code for OpenWire format for ConnectionInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -35,6 +35,8 @@ ConnectionInfo::ConnectionInfo()
this->password = NULL ;
this->userName = NULL ;
this->brokerPath = NULL ;
this->brokerMasterConnector = false ;
this->manageable = false ;
}
ConnectionInfo::~ConnectionInfo()
@ -101,27 +103,51 @@ void ConnectionInfo::setBrokerPath(array<BrokerId> brokerPath)
this->brokerPath = brokerPath ;
}
int ConnectionInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
bool ConnectionInfo::getBrokerMasterConnector()
{
return brokerMasterConnector ;
}
void ConnectionInfo::setBrokerMasterConnector(bool brokerMasterConnector)
{
this->brokerMasterConnector = brokerMasterConnector ;
}
bool ConnectionInfo::getManageable()
{
return manageable ;
}
void ConnectionInfo::setManageable(bool manageable)
{
this->manageable = manageable ;
}
int ConnectionInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(connectionId, mode, writer) ;
size += marshaller->marshalString(clientId, mode, writer) ;
size += marshaller->marshalString(password, mode, writer) ;
size += marshaller->marshalString(userName, mode, writer) ;
size += marshaller->marshalObjectArray(brokerPath, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(connectionId, mode, ostream) ;
size += marshaller->marshalString(clientId, mode, ostream) ;
size += marshaller->marshalString(password, mode, ostream) ;
size += marshaller->marshalString(userName, mode, ostream) ;
size += marshaller->marshalObjectArray(brokerPath, mode, ostream) ;
size += marshaller->marshalBoolean(brokerMasterConnector, mode, ostream) ;
size += marshaller->marshalBoolean(manageable, mode, ostream) ;
return size ;
}
void ConnectionInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ConnectionInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
clientId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
password = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
userName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
clientId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
password = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
userName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, istream)) ;
brokerMasterConnector = (marshaller->unmarshalBoolean(mode, istream)) ;
manageable = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -26,6 +26,7 @@
#include "activemq/command/BaseCommand.hpp"
#include "activemq/command/ConnectionId.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -47,7 +48,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ConnectionInfo
* Command and marshalling code for OpenWire format for ConnectionInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -63,6 +64,8 @@ protected:
p<string> password ;
p<string> userName ;
array<BrokerId> brokerPath ;
bool brokerMasterConnector ;
bool manageable ;
public:
const static unsigned char TYPE = 3;
@ -88,8 +91,14 @@ public:
virtual array<BrokerId> getBrokerPath() ;
virtual void setBrokerPath(array<BrokerId> brokerPath) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual bool getBrokerMasterConnector() ;
virtual void setBrokerMasterConnector(bool brokerMasterConnector) ;
virtual bool getManageable() ;
virtual void setManageable(bool manageable) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -0,0 +1,97 @@
/*
* 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.
*/
#include "activemq/command/ConsumerControl.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for ConsumerControl
*
*
* 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
*
*/
ConsumerControl::ConsumerControl()
{
this->close = false ;
this->consumerId = NULL ;
this->prefetch = 0 ;
}
ConsumerControl::~ConsumerControl()
{
}
unsigned char ConsumerControl::getDataStructureType()
{
return ConsumerControl::TYPE ;
}
bool ConsumerControl::getClose()
{
return close ;
}
void ConsumerControl::setClose(bool close)
{
this->close = close ;
}
p<ConsumerId> ConsumerControl::getConsumerId()
{
return consumerId ;
}
void ConsumerControl::setConsumerId(p<ConsumerId> consumerId)
{
this->consumerId = consumerId ;
}
int ConsumerControl::getPrefetch()
{
return prefetch ;
}
void ConsumerControl::setPrefetch(int prefetch)
{
this->prefetch = prefetch ;
}
int ConsumerControl::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalBoolean(close, mode, ostream) ;
size += marshaller->marshalObject(consumerId, mode, ostream) ;
size += marshaller->marshalInt(prefetch, mode, ostream) ;
return size ;
}
void ConsumerControl::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
BaseCommand::unmarshal(marshaller, mode, istream) ;
close = (marshaller->unmarshalBoolean(mode, istream)) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
prefetch = (marshaller->unmarshalInt(mode, istream)) ;
}

View File

@ -0,0 +1,92 @@
/*
* 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.
*/
#ifndef ActiveMQ_ConsumerControl_hpp_
#define ActiveMQ_ConsumerControl_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
#include "activemq/command/BaseCommand.hpp"
#include "activemq/command/ConsumerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for ConsumerControl
*
*
* 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
*
*/
class ConsumerControl : public BaseCommand
{
protected:
bool close ;
p<ConsumerId> consumerId ;
int prefetch ;
public:
const static unsigned char TYPE = 17;
public:
ConsumerControl() ;
virtual ~ConsumerControl() ;
virtual unsigned char getDataStructureType() ;
virtual bool getClose() ;
virtual void setClose(bool close) ;
virtual p<ConsumerId> getConsumerId() ;
virtual void setConsumerId(p<ConsumerId> consumerId) ;
virtual int getPrefetch() ;
virtual void setPrefetch(int prefetch) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_ConsumerControl_hpp_*/

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ConsumerId
* Command and marshalling code for OpenWire format for ConsumerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -77,19 +77,21 @@ void ConsumerId::setValue(long long value)
this->value = value ;
}
int ConsumerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ConsumerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalString(connectionId, mode, writer) ;
size += marshaller->marshalLong(sessionId, mode, writer) ;
size += marshaller->marshalLong(value, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(connectionId, mode, ostream) ;
size += marshaller->marshalLong(sessionId, mode, ostream) ;
size += marshaller->marshalLong(value, mode, ostream) ;
return size ;
}
void ConsumerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ConsumerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
connectionId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
sessionId = (marshaller->unmarshalLong(mode, reader)) ;
value = (marshaller->unmarshalLong(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
connectionId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
sessionId = (marshaller->unmarshalLong(mode, istream)) ;
value = (marshaller->unmarshalLong(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ConsumerId
* Command and marshalling code for OpenWire format for ConsumerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class ConsumerId : public AbstractCommand
class ConsumerId : public BaseDataStructure
{
protected:
p<string> connectionId ;
@ -78,8 +79,8 @@ public:
virtual long long getValue() ;
virtual void setValue(long long value) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ConsumerInfo
* Command and marshalling code for OpenWire format for ConsumerInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -34,6 +34,7 @@ ConsumerInfo::ConsumerInfo()
this->browser = false ;
this->destination = NULL ;
this->prefetchSize = 0 ;
this->maximumPendingMessageLimit = 0 ;
this->dispatchAsync = false ;
this->selector = NULL ;
this->subcriptionName = NULL ;
@ -42,7 +43,10 @@ ConsumerInfo::ConsumerInfo()
this->retroactive = false ;
this->priority = 0 ;
this->brokerPath = NULL ;
this->additionalPredicate = NULL ;
this->networkSubscription = false ;
this->optimizedAcknowledge = false ;
this->noRangeAcks = false ;
}
ConsumerInfo::~ConsumerInfo()
@ -99,6 +103,17 @@ void ConsumerInfo::setPrefetchSize(int prefetchSize)
}
int ConsumerInfo::getMaximumPendingMessageLimit()
{
return maximumPendingMessageLimit ;
}
void ConsumerInfo::setMaximumPendingMessageLimit(int maximumPendingMessageLimit)
{
this->maximumPendingMessageLimit = maximumPendingMessageLimit ;
}
bool ConsumerInfo::getDispatchAsync()
{
return dispatchAsync ;
@ -187,6 +202,17 @@ void ConsumerInfo::setBrokerPath(array<BrokerId> brokerPath)
}
p<BooleanExpression> ConsumerInfo::getAdditionalPredicate()
{
return additionalPredicate ;
}
void ConsumerInfo::setAdditionalPredicate(p<BooleanExpression> additionalPredicate)
{
this->additionalPredicate = additionalPredicate ;
}
bool ConsumerInfo::getNetworkSubscription()
{
return networkSubscription ;
@ -197,47 +223,71 @@ void ConsumerInfo::setNetworkSubscription(bool networkSubscription)
this->networkSubscription = networkSubscription ;
}
int ConsumerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
bool ConsumerInfo::getOptimizedAcknowledge()
{
return optimizedAcknowledge ;
}
void ConsumerInfo::setOptimizedAcknowledge(bool optimizedAcknowledge)
{
this->optimizedAcknowledge = optimizedAcknowledge ;
}
bool ConsumerInfo::getNoRangeAcks()
{
return noRangeAcks ;
}
void ConsumerInfo::setNoRangeAcks(bool noRangeAcks)
{
this->noRangeAcks = noRangeAcks ;
}
int ConsumerInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(consumerId, mode, writer) ;
size += marshaller->marshalBoolean(browser, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalInt(prefetchSize, mode, writer) ;
size += marshaller->marshalInt(maximumPendingMessageLimit, mode, writer) ;
size += marshaller->marshalBoolean(dispatchAsync, mode, writer) ;
size += marshaller->marshalString(selector, mode, writer) ;
size += marshaller->marshalString(subcriptionName, mode, writer) ;
size += marshaller->marshalBoolean(noLocal, mode, writer) ;
size += marshaller->marshalBoolean(exclusive, mode, writer) ;
size += marshaller->marshalBoolean(retroactive, mode, writer) ;
size += marshaller->marshalByte(priority, mode, writer) ;
size += marshaller->marshalObjectArray(brokerPath, mode, writer) ;
size += marshaller->marshalObject(additionalPredicate, mode, writer) ;
size += marshaller->marshalBoolean(networkSubscription, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(consumerId, mode, ostream) ;
size += marshaller->marshalBoolean(browser, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalInt(prefetchSize, mode, ostream) ;
size += marshaller->marshalInt(maximumPendingMessageLimit, mode, ostream) ;
size += marshaller->marshalBoolean(dispatchAsync, mode, ostream) ;
size += marshaller->marshalString(selector, mode, ostream) ;
size += marshaller->marshalString(subcriptionName, mode, ostream) ;
size += marshaller->marshalBoolean(noLocal, mode, ostream) ;
size += marshaller->marshalBoolean(exclusive, mode, ostream) ;
size += marshaller->marshalBoolean(retroactive, mode, ostream) ;
size += marshaller->marshalByte(priority, mode, ostream) ;
size += marshaller->marshalObjectArray(brokerPath, mode, ostream) ;
size += marshaller->marshalObject(additionalPredicate, mode, ostream) ;
size += marshaller->marshalBoolean(networkSubscription, mode, ostream) ;
size += marshaller->marshalBoolean(optimizedAcknowledge, mode, ostream) ;
size += marshaller->marshalBoolean(noRangeAcks, mode, ostream) ;
return size ;
}
void ConsumerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ConsumerInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, reader)) ;
browser = (marshaller->unmarshalBoolean(mode, reader)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
prefetchSize = (marshaller->unmarshalInt(mode, reader)) ;
maximumPendingMessageLimit = (marshaller->unmarshalInt(mode, reader)) ;
dispatchAsync = (marshaller->unmarshalBoolean(mode, reader)) ;
selector = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
subcriptionName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
noLocal = (marshaller->unmarshalBoolean(mode, reader)) ;
exclusive = (marshaller->unmarshalBoolean(mode, reader)) ;
retroactive = (marshaller->unmarshalBoolean(mode, reader)) ;
priority = (marshaller->unmarshalByte(mode, reader)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, reader)) ;
additionalPredicate = p_cast<BooleanExpression>(marshaller->unmarshalObject(mode, reader)) ;
networkSubscription = (marshaller->unmarshalBoolean(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
browser = (marshaller->unmarshalBoolean(mode, istream)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
prefetchSize = (marshaller->unmarshalInt(mode, istream)) ;
maximumPendingMessageLimit = (marshaller->unmarshalInt(mode, istream)) ;
dispatchAsync = (marshaller->unmarshalBoolean(mode, istream)) ;
selector = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
subcriptionName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
noLocal = (marshaller->unmarshalBoolean(mode, istream)) ;
exclusive = (marshaller->unmarshalBoolean(mode, istream)) ;
retroactive = (marshaller->unmarshalBoolean(mode, istream)) ;
priority = (marshaller->unmarshalByte(mode, istream)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, istream)) ;
additionalPredicate = p_cast<BooleanExpression>(marshaller->unmarshalObject(mode, istream)) ;
networkSubscription = (marshaller->unmarshalBoolean(mode, istream)) ;
optimizedAcknowledge = (marshaller->unmarshalBoolean(mode, istream)) ;
noRangeAcks = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -28,6 +28,7 @@
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/command/BooleanExpression.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -49,7 +50,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ConsumerInfo
* Command and marshalling code for OpenWire format for ConsumerInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -61,10 +62,10 @@ class ConsumerInfo : public BaseCommand
{
protected:
p<ConsumerId> consumerId ;
bool browser ;
p<ActiveMQDestination> destination ;
int prefetchSize ;
int maximumPendingMessageLimit ;
bool browser ;
bool dispatchAsync ;
p<string> selector ;
p<string> subcriptionName ;
@ -75,6 +76,8 @@ protected:
array<BrokerId> brokerPath ;
p<BooleanExpression> additionalPredicate ;
bool networkSubscription ;
bool optimizedAcknowledge ;
bool noRangeAcks ;
public:
const static unsigned char TYPE = 5;
@ -97,6 +100,9 @@ public:
virtual int getPrefetchSize() ;
virtual void setPrefetchSize(int prefetchSize) ;
virtual int getMaximumPendingMessageLimit() ;
virtual void setMaximumPendingMessageLimit(int maximumPendingMessageLimit) ;
virtual bool getDispatchAsync() ;
virtual void setDispatchAsync(bool dispatchAsync) ;
@ -121,11 +127,20 @@ public:
virtual array<BrokerId> getBrokerPath() ;
virtual void setBrokerPath(array<BrokerId> brokerPath) ;
virtual p<BooleanExpression> getAdditionalPredicate() ;
virtual void setAdditionalPredicate(p<BooleanExpression> additionalPredicate) ;
virtual bool getNetworkSubscription() ;
virtual void setNetworkSubscription(bool networkSubscription) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual bool getOptimizedAcknowledge() ;
virtual void setOptimizedAcknowledge(bool optimizedAcknowledge) ;
virtual bool getNoRangeAcks() ;
virtual void setNoRangeAcks(bool noRangeAcks) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ControlCommand
* Command and marshalling code for OpenWire format for ControlCommand
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void ControlCommand::setCommand(p<string> command)
this->command = command ;
}
int ControlCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ControlCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalString(command, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(command, mode, ostream) ;
return size ;
}
void ControlCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ControlCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
command = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
command = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -24,6 +24,7 @@
#include <string>
#include "activemq/command/BaseCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ControlCommand
* Command and marshalling code for OpenWire format for ControlCommand
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -70,8 +71,8 @@ public:
virtual p<string> getCommand() ;
virtual void setCommand(p<string> command) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for DataArrayResponse
* Command and marshalling code for OpenWire format for DataArrayResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void DataArrayResponse::setData(array<IDataStructure> data)
this->data = data ;
}
int DataArrayResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int DataArrayResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObjectArray(data, mode, writer) ;
size += Response::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObjectArray(data, mode, ostream) ;
return size ;
}
void DataArrayResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void DataArrayResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
data = array_cast<IDataStructure>(marshaller->unmarshalObjectArray(mode, reader)) ;
Response::unmarshal(marshaller, mode, istream) ;
data = array_cast<IDataStructure>(marshaller->unmarshalObjectArray(mode, istream)) ;
}

View File

@ -23,8 +23,9 @@
#endif
#include <string>
#include "activemq/IDataStructure.hpp"
#include "activemq/command/Response.hpp"
#include "activemq/IDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for DataArrayResponse
* Command and marshalling code for OpenWire format for DataArrayResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -71,8 +72,8 @@ public:
virtual array<IDataStructure> getData() ;
virtual void setData(array<IDataStructure> data) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for DataResponse
* Command and marshalling code for OpenWire format for DataResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void DataResponse::setData(p<IDataStructure> data)
this->data = data ;
}
int DataResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int DataResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(data, mode, writer) ;
size += Response::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(data, mode, ostream) ;
return size ;
}
void DataResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void DataResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
data = p_cast<IDataStructure>(marshaller->unmarshalObject(mode, reader)) ;
Response::unmarshal(marshaller, mode, istream) ;
data = p_cast<IDataStructure>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -23,8 +23,9 @@
#endif
#include <string>
#include "activemq/IDataStructure.hpp"
#include "activemq/command/Response.hpp"
#include "activemq/IDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for DataResponse
* Command and marshalling code for OpenWire format for DataResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -71,8 +72,8 @@ public:
virtual p<IDataStructure> getData() ;
virtual void setData(p<IDataStructure> data) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for DestinationInfo
* Command and marshalling code for OpenWire format for DestinationInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -101,27 +101,25 @@ void DestinationInfo::setBrokerPath(array<BrokerId> brokerPath)
this->brokerPath = brokerPath ;
}
int DestinationInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int DestinationInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(connectionId, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalByte(operationType, mode, writer) ;
size += marshaller->marshalLong(timeout, mode, writer) ;
size += marshaller->marshalObjectArray(brokerPath, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(connectionId, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalByte(operationType, mode, ostream) ;
size += marshaller->marshalLong(timeout, mode, ostream) ;
size += marshaller->marshalObjectArray(brokerPath, mode, ostream) ;
return size ;
}
void DestinationInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void DestinationInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
operationType = (marshaller->unmarshalByte(mode, reader)) ;
timeout = (marshaller->unmarshalLong(mode, reader)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
operationType = (marshaller->unmarshalByte(mode, istream)) ;
timeout = (marshaller->unmarshalLong(mode, istream)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, istream)) ;
}

View File

@ -27,6 +27,7 @@
#include "activemq/command/ConnectionId.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -48,7 +49,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for DestinationInfo
* Command and marshalling code for OpenWire format for DestinationInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -89,8 +90,8 @@ public:
virtual array<BrokerId> getBrokerPath() ;
virtual void setBrokerPath(array<BrokerId> brokerPath) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for DiscoveryEvent
* Command and marshalling code for OpenWire format for DiscoveryEvent
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -65,21 +65,19 @@ void DiscoveryEvent::setBrokerName(p<string> brokerName)
this->brokerName = brokerName ;
}
int DiscoveryEvent::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int DiscoveryEvent::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalString(serviceName, mode, writer) ;
size += marshaller->marshalString(brokerName, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(serviceName, mode, ostream) ;
size += marshaller->marshalString(brokerName, mode, ostream) ;
return size ;
}
void DiscoveryEvent::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void DiscoveryEvent::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
serviceName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
brokerName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
serviceName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
brokerName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for DiscoveryEvent
* Command and marshalling code for OpenWire format for DiscoveryEvent
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class DiscoveryEvent : public AbstractCommand
class DiscoveryEvent : public BaseDataStructure
{
protected:
p<string> serviceName ;
@ -74,8 +75,8 @@ public:
virtual p<string> getBrokerName() ;
virtual void setBrokerName(p<string> brokerName) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ExceptionResponse
* Command and marshalling code for OpenWire format for ExceptionResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void ExceptionResponse::setException(p<BrokerError> exception)
this->exception = exception ;
}
int ExceptionResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ExceptionResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(exception, mode, writer) ;
size += Response::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(exception, mode, ostream) ;
return size ;
}
void ExceptionResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ExceptionResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, reader)) ;
Response::unmarshal(marshaller, mode, istream) ;
exception = p_cast<BrokerError>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -25,6 +25,7 @@
#include <string>
#include "activemq/command/Response.hpp"
#include "activemq/command/BrokerError.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ExceptionResponse
* Command and marshalling code for OpenWire format for ExceptionResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -71,8 +72,8 @@ public:
virtual p<BrokerError> getException() ;
virtual void setException(p<BrokerError> exception) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for FlushCommand
* Command and marshalling code for OpenWire format for FlushCommand
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -41,17 +41,15 @@ unsigned char FlushCommand::getDataStructureType()
return FlushCommand::TYPE ;
}
int FlushCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int FlushCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
return size ;
}
void FlushCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void FlushCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
}

View File

@ -24,6 +24,7 @@
#include <string>
#include "activemq/command/BaseCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for FlushCommand
* Command and marshalling code for OpenWire format for FlushCommand
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -66,8 +67,8 @@ public:
virtual unsigned char getDataStructureType() ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for IntegerResponse
* Command and marshalling code for OpenWire format for IntegerResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void IntegerResponse::setResult(int result)
this->result = result ;
}
int IntegerResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int IntegerResponse::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalInt(result, mode, writer) ;
size += Response::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalInt(result, mode, ostream) ;
return size ;
}
void IntegerResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void IntegerResponse::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
result = (marshaller->unmarshalInt(mode, reader)) ;
Response::unmarshal(marshaller, mode, istream) ;
result = (marshaller->unmarshalInt(mode, istream)) ;
}

View File

@ -24,6 +24,7 @@
#include <string>
#include "activemq/command/Response.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for IntegerResponse
* Command and marshalling code for OpenWire format for IntegerResponse
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -70,8 +71,8 @@ public:
virtual int getResult() ;
virtual void setResult(int result) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for JournalQueueAck
* Command and marshalling code for OpenWire format for JournalQueueAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -65,21 +65,19 @@ void JournalQueueAck::setMessageAck(p<MessageAck> messageAck)
this->messageAck = messageAck ;
}
int JournalQueueAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int JournalQueueAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalObject(messageAck, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalObject(messageAck, mode, ostream) ;
return size ;
}
void JournalQueueAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void JournalQueueAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
messageAck = p_cast<MessageAck>(marshaller->unmarshalObject(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
messageAck = p_cast<MessageAck>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -23,9 +23,10 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/MessageAck.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -47,7 +48,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for JournalQueueAck
* Command and marshalling code for OpenWire format for JournalQueueAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -55,7 +56,7 @@ namespace apache
* activemq-core module
*
*/
class JournalQueueAck : public AbstractCommand
class JournalQueueAck : public BaseDataStructure
{
protected:
p<ActiveMQDestination> destination ;
@ -76,8 +77,8 @@ public:
virtual p<MessageAck> getMessageAck() ;
virtual void setMessageAck(p<MessageAck> messageAck) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for JournalTopicAck
* Command and marshalling code for OpenWire format for JournalTopicAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -113,29 +113,27 @@ void JournalTopicAck::setTransactionId(p<TransactionId> transactionId)
this->transactionId = transactionId ;
}
int JournalTopicAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int JournalTopicAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalObject(messageId, mode, writer) ;
size += marshaller->marshalLong(messageSequenceId, mode, writer) ;
size += marshaller->marshalString(subscritionName, mode, writer) ;
size += marshaller->marshalString(clientId, mode, writer) ;
size += marshaller->marshalObject(transactionId, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalObject(messageId, mode, ostream) ;
size += marshaller->marshalLong(messageSequenceId, mode, ostream) ;
size += marshaller->marshalString(subscritionName, mode, ostream) ;
size += marshaller->marshalString(clientId, mode, ostream) ;
size += marshaller->marshalObject(transactionId, mode, ostream) ;
return size ;
}
void JournalTopicAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void JournalTopicAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, reader)) ;
messageSequenceId = (marshaller->unmarshalLong(mode, reader)) ;
subscritionName = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
clientId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, istream)) ;
messageSequenceId = (marshaller->unmarshalLong(mode, istream)) ;
subscritionName = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
clientId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -23,10 +23,11 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/MessageId.hpp"
#include "activemq/command/TransactionId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -48,7 +49,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for JournalTopicAck
* Command and marshalling code for OpenWire format for JournalTopicAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -56,7 +57,7 @@ namespace apache
* activemq-core module
*
*/
class JournalTopicAck : public AbstractCommand
class JournalTopicAck : public BaseDataStructure
{
protected:
p<ActiveMQDestination> destination ;
@ -93,8 +94,8 @@ public:
virtual p<TransactionId> getTransactionId() ;
virtual void setTransactionId(p<TransactionId> transactionId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for JournalTrace
* Command and marshalling code for OpenWire format for JournalTrace
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,19 +53,17 @@ void JournalTrace::setMessage(p<string> message)
this->message = message ;
}
int JournalTrace::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int JournalTrace::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalString(message, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(message, mode, ostream) ;
return size ;
}
void JournalTrace::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void JournalTrace::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
message = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
message = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for JournalTrace
* Command and marshalling code for OpenWire format for JournalTrace
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class JournalTrace : public AbstractCommand
class JournalTrace : public BaseDataStructure
{
protected:
p<string> message ;
@ -70,8 +71,8 @@ public:
virtual p<string> getMessage() ;
virtual void setMessage(p<string> message) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for JournalTransaction
* Command and marshalling code for OpenWire format for JournalTransaction
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -77,23 +77,21 @@ void JournalTransaction::setWasPrepared(bool wasPrepared)
this->wasPrepared = wasPrepared ;
}
int JournalTransaction::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int JournalTransaction::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(transactionId, mode, writer) ;
size += marshaller->marshalByte(type, mode, writer) ;
size += marshaller->marshalBoolean(wasPrepared, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(transactionId, mode, ostream) ;
size += marshaller->marshalByte(type, mode, ostream) ;
size += marshaller->marshalBoolean(wasPrepared, mode, ostream) ;
return size ;
}
void JournalTransaction::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void JournalTransaction::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, reader)) ;
type = (marshaller->unmarshalByte(mode, reader)) ;
wasPrepared = (marshaller->unmarshalBoolean(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, istream)) ;
type = (marshaller->unmarshalByte(mode, istream)) ;
wasPrepared = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -23,8 +23,9 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/TransactionId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for JournalTransaction
* Command and marshalling code for OpenWire format for JournalTransaction
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -54,7 +55,7 @@ namespace apache
* activemq-core module
*
*/
class JournalTransaction : public AbstractCommand
class JournalTransaction : public BaseDataStructure
{
protected:
p<TransactionId> transactionId ;
@ -79,8 +80,8 @@ public:
virtual bool getWasPrepared() ;
virtual void setWasPrepared(bool wasPrepared) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for KeepAliveInfo
* Command and marshalling code for OpenWire format for KeepAliveInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -41,17 +41,15 @@ unsigned char KeepAliveInfo::getDataStructureType()
return KeepAliveInfo::TYPE ;
}
int KeepAliveInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int KeepAliveInfo::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
return size ;
}
void KeepAliveInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void KeepAliveInfo::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for KeepAliveInfo
* Command and marshalling code for OpenWire format for KeepAliveInfo
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class KeepAliveInfo : public AbstractCommand
class KeepAliveInfo : public BaseCommand
{
protected:
@ -66,8 +67,8 @@ public:
virtual unsigned char getDataStructureType() ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -0,0 +1,55 @@
/*
* 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.
*/
#include "activemq/command/LastPartialCommand.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for LastPartialCommand
*
*
* 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
*
*/
LastPartialCommand::LastPartialCommand()
{
}
LastPartialCommand::~LastPartialCommand()
{
}
unsigned char LastPartialCommand::getDataStructureType()
{
return LastPartialCommand::TYPE ;
}
int LastPartialCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += PartialCommand::marshal(marshaller, mode, ostream) ;
return size ;
}
void LastPartialCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
PartialCommand::unmarshal(marshaller, mode, istream) ;
}

View File

@ -0,0 +1,79 @@
/*
* 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.
*/
#ifndef ActiveMQ_LastPartialCommand_hpp_
#define ActiveMQ_LastPartialCommand_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
#include "activemq/command/PartialCommand.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for LastPartialCommand
*
*
* 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
*
*/
class LastPartialCommand : public PartialCommand
{
protected:
public:
const static unsigned char TYPE = 61;
public:
LastPartialCommand() ;
virtual ~LastPartialCommand() ;
virtual unsigned char getDataStructureType() ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_LastPartialCommand_hpp_*/

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for LocalTransactionId
* Command and marshalling code for OpenWire format for LocalTransactionId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -65,17 +65,19 @@ void LocalTransactionId::setConnectionId(p<ConnectionId> connectionId)
this->connectionId = connectionId ;
}
int LocalTransactionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int LocalTransactionId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalLong(value, mode, writer) ;
size += marshaller->marshalObject(connectionId, mode, writer) ;
size += TransactionId::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalLong(value, mode, ostream) ;
size += marshaller->marshalObject(connectionId, mode, ostream) ;
return size ;
}
void LocalTransactionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void LocalTransactionId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
value = (marshaller->unmarshalLong(mode, reader)) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, reader)) ;
TransactionId::unmarshal(marshaller, mode, istream) ;
value = (marshaller->unmarshalLong(mode, istream)) ;
connectionId = p_cast<ConnectionId>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -25,6 +25,7 @@
#include <string>
#include "activemq/command/TransactionId.hpp"
#include "activemq/command/ConnectionId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for LocalTransactionId
* Command and marshalling code for OpenWire format for LocalTransactionId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -75,8 +76,8 @@ public:
virtual p<ConnectionId> getConnectionId() ;
virtual void setConnectionId(p<ConnectionId> connectionId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for Message
* Command and marshalling code for OpenWire format for Message
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -341,67 +341,65 @@ void Message::setRecievedByDFBridge(bool recievedByDFBridge)
this->recievedByDFBridge = recievedByDFBridge ;
}
int Message::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int Message::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(producerId, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalObject(transactionId, mode, writer) ;
size += marshaller->marshalObject(originalDestination, mode, writer) ;
size += marshaller->marshalObject(messageId, mode, writer) ;
size += marshaller->marshalObject(originalTransactionId, mode, writer) ;
size += marshaller->marshalString(groupID, mode, writer) ;
size += marshaller->marshalInt(groupSequence, mode, writer) ;
size += marshaller->marshalString(correlationId, mode, writer) ;
size += marshaller->marshalBoolean(persistent, mode, writer) ;
size += marshaller->marshalLong(expiration, mode, writer) ;
size += marshaller->marshalByte(priority, mode, writer) ;
size += marshaller->marshalObject(replyTo, mode, writer) ;
size += marshaller->marshalLong(timestamp, mode, writer) ;
size += marshaller->marshalString(type, mode, writer) ;
size += marshaller->marshalByteArray(content, mode, writer) ;
size += marshaller->marshalByteArray(marshalledProperties, mode, writer) ;
size += marshaller->marshalObject(dataStructure, mode, writer) ;
size += marshaller->marshalObject(targetConsumerId, mode, writer) ;
size += marshaller->marshalBoolean(compressed, mode, writer) ;
size += marshaller->marshalInt(redeliveryCounter, mode, writer) ;
size += marshaller->marshalObjectArray(brokerPath, mode, writer) ;
size += marshaller->marshalLong(arrival, mode, writer) ;
size += marshaller->marshalString(userID, mode, writer) ;
size += marshaller->marshalBoolean(recievedByDFBridge, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(producerId, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalObject(transactionId, mode, ostream) ;
size += marshaller->marshalObject(originalDestination, mode, ostream) ;
size += marshaller->marshalObject(messageId, mode, ostream) ;
size += marshaller->marshalObject(originalTransactionId, mode, ostream) ;
size += marshaller->marshalString(groupID, mode, ostream) ;
size += marshaller->marshalInt(groupSequence, mode, ostream) ;
size += marshaller->marshalString(correlationId, mode, ostream) ;
size += marshaller->marshalBoolean(persistent, mode, ostream) ;
size += marshaller->marshalLong(expiration, mode, ostream) ;
size += marshaller->marshalByte(priority, mode, ostream) ;
size += marshaller->marshalObject(replyTo, mode, ostream) ;
size += marshaller->marshalLong(timestamp, mode, ostream) ;
size += marshaller->marshalString(type, mode, ostream) ;
size += marshaller->marshalByteArray(content, mode, ostream) ;
size += marshaller->marshalByteArray(marshalledProperties, mode, ostream) ;
size += marshaller->marshalObject(dataStructure, mode, ostream) ;
size += marshaller->marshalObject(targetConsumerId, mode, ostream) ;
size += marshaller->marshalBoolean(compressed, mode, ostream) ;
size += marshaller->marshalInt(redeliveryCounter, mode, ostream) ;
size += marshaller->marshalObjectArray(brokerPath, mode, ostream) ;
size += marshaller->marshalLong(arrival, mode, ostream) ;
size += marshaller->marshalString(userID, mode, ostream) ;
size += marshaller->marshalBoolean(recievedByDFBridge, mode, ostream) ;
return size ;
}
void Message::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void Message::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
producerId = p_cast<ProducerId>(marshaller->unmarshalObject(mode, reader)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, reader)) ;
originalDestination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, reader)) ;
originalTransactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, reader)) ;
groupID = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
groupSequence = (marshaller->unmarshalInt(mode, reader)) ;
correlationId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
persistent = (marshaller->unmarshalBoolean(mode, reader)) ;
expiration = (marshaller->unmarshalLong(mode, reader)) ;
priority = (marshaller->unmarshalByte(mode, reader)) ;
replyTo = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
timestamp = (marshaller->unmarshalLong(mode, reader)) ;
type = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
content = (marshaller->unmarshalByteArray(mode, reader)) ;
marshalledProperties = (marshaller->unmarshalByteArray(mode, reader)) ;
dataStructure = p_cast<IDataStructure>(marshaller->unmarshalObject(mode, reader)) ;
targetConsumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, reader)) ;
compressed = (marshaller->unmarshalBoolean(mode, reader)) ;
redeliveryCounter = (marshaller->unmarshalInt(mode, reader)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, reader)) ;
arrival = (marshaller->unmarshalLong(mode, reader)) ;
userID = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
recievedByDFBridge = (marshaller->unmarshalBoolean(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
producerId = p_cast<ProducerId>(marshaller->unmarshalObject(mode, istream)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, istream)) ;
originalDestination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, istream)) ;
originalTransactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, istream)) ;
groupID = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
groupSequence = (marshaller->unmarshalInt(mode, istream)) ;
correlationId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
persistent = (marshaller->unmarshalBoolean(mode, istream)) ;
expiration = (marshaller->unmarshalLong(mode, istream)) ;
priority = (marshaller->unmarshalByte(mode, istream)) ;
replyTo = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
timestamp = (marshaller->unmarshalLong(mode, istream)) ;
type = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
content = (marshaller->unmarshalByteArray(mode, istream)) ;
marshalledProperties = (marshaller->unmarshalByteArray(mode, istream)) ;
dataStructure = p_cast<IDataStructure>(marshaller->unmarshalObject(mode, istream)) ;
targetConsumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
compressed = (marshaller->unmarshalBoolean(mode, istream)) ;
redeliveryCounter = (marshaller->unmarshalInt(mode, istream)) ;
brokerPath = array_cast<BrokerId>(marshaller->unmarshalObjectArray(mode, istream)) ;
arrival = (marshaller->unmarshalLong(mode, istream)) ;
userID = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
recievedByDFBridge = (marshaller->unmarshalBoolean(mode, istream)) ;
}

View File

@ -23,7 +23,6 @@
#endif
#include <string>
#include "activemq/IDataStructure.hpp"
#include "activemq/command/BaseCommand.hpp"
#include "activemq/command/ProducerId.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
@ -32,8 +31,10 @@
#include "activemq/command/MessageId.hpp"
#include "activemq/command/TransactionId.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/IDataStructure.hpp"
#include "activemq/command/ConsumerId.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -55,7 +56,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for Message
* Command and marshalling code for OpenWire format for Message
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -176,8 +177,8 @@ public:
virtual bool getRecievedByDFBridge() ;
virtual void setRecievedByDFBridge(bool recievedByDFBridge) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for MessageAck
* Command and marshalling code for OpenWire format for MessageAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -125,31 +125,29 @@ void MessageAck::setMessageCount(int messageCount)
this->messageCount = messageCount ;
}
int MessageAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int MessageAck::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalObject(transactionId, mode, writer) ;
size += marshaller->marshalObject(consumerId, mode, writer) ;
size += marshaller->marshalByte(ackType, mode, writer) ;
size += marshaller->marshalObject(firstMessageId, mode, writer) ;
size += marshaller->marshalObject(lastMessageId, mode, writer) ;
size += marshaller->marshalInt(messageCount, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalObject(transactionId, mode, ostream) ;
size += marshaller->marshalObject(consumerId, mode, ostream) ;
size += marshaller->marshalByte(ackType, mode, ostream) ;
size += marshaller->marshalObject(firstMessageId, mode, ostream) ;
size += marshaller->marshalObject(lastMessageId, mode, ostream) ;
size += marshaller->marshalInt(messageCount, mode, ostream) ;
return size ;
}
void MessageAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void MessageAck::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, reader)) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, reader)) ;
ackType = (marshaller->unmarshalByte(mode, reader)) ;
firstMessageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, reader)) ;
lastMessageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, reader)) ;
messageCount = (marshaller->unmarshalInt(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
transactionId = p_cast<TransactionId>(marshaller->unmarshalObject(mode, istream)) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
ackType = (marshaller->unmarshalByte(mode, istream)) ;
firstMessageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, istream)) ;
lastMessageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, istream)) ;
messageCount = (marshaller->unmarshalInt(mode, istream)) ;
}

View File

@ -29,6 +29,7 @@
#include "activemq/command/ConsumerId.hpp"
#include "activemq/command/MessageId.hpp"
#include "activemq/command/MessageId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -50,7 +51,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for MessageAck
* Command and marshalling code for OpenWire format for MessageAck
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -99,8 +100,8 @@ public:
virtual int getMessageCount() ;
virtual void setMessageCount(int messageCount) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for MessageDispatch
* Command and marshalling code for OpenWire format for MessageDispatch
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -89,25 +89,23 @@ void MessageDispatch::setRedeliveryCounter(int redeliveryCounter)
this->redeliveryCounter = redeliveryCounter ;
}
int MessageDispatch::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int MessageDispatch::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(consumerId, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalObject(message, mode, writer) ;
size += marshaller->marshalInt(redeliveryCounter, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(consumerId, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalObject(message, mode, ostream) ;
size += marshaller->marshalInt(redeliveryCounter, mode, ostream) ;
return size ;
}
void MessageDispatch::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void MessageDispatch::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, reader)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
message = p_cast<Message>(marshaller->unmarshalObject(mode, reader)) ;
redeliveryCounter = (marshaller->unmarshalInt(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
message = p_cast<Message>(marshaller->unmarshalObject(mode, istream)) ;
redeliveryCounter = (marshaller->unmarshalInt(mode, istream)) ;
}

View File

@ -27,6 +27,7 @@
#include "activemq/command/ConsumerId.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/Message.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -48,7 +49,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for MessageDispatch
* Command and marshalling code for OpenWire format for MessageDispatch
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -85,8 +86,8 @@ public:
virtual int getRedeliveryCounter() ;
virtual void setRedeliveryCounter(int redeliveryCounter) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for MessageDispatchNotification
* Command and marshalling code for OpenWire format for MessageDispatchNotification
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -89,25 +89,23 @@ void MessageDispatchNotification::setMessageId(p<MessageId> messageId)
this->messageId = messageId ;
}
int MessageDispatchNotification::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int MessageDispatchNotification::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalInt(commandId, mode, writer) ;
size += marshaller->marshalBoolean(responseRequired, mode, writer) ;
size += marshaller->marshalObject(consumerId, mode, writer) ;
size += marshaller->marshalObject(destination, mode, writer) ;
size += marshaller->marshalLong(deliverySequenceId, mode, writer) ;
size += marshaller->marshalObject(messageId, mode, writer) ;
size += BaseCommand::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(consumerId, mode, ostream) ;
size += marshaller->marshalObject(destination, mode, ostream) ;
size += marshaller->marshalLong(deliverySequenceId, mode, ostream) ;
size += marshaller->marshalObject(messageId, mode, ostream) ;
return size ;
}
void MessageDispatchNotification::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void MessageDispatchNotification::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
commandId = marshaller->unmarshalInt(mode, reader) ;
responseRequired = marshaller->unmarshalBoolean(mode, reader) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, reader)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, reader)) ;
deliverySequenceId = (marshaller->unmarshalLong(mode, reader)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, reader)) ;
BaseCommand::unmarshal(marshaller, mode, istream) ;
consumerId = p_cast<ConsumerId>(marshaller->unmarshalObject(mode, istream)) ;
destination = p_cast<ActiveMQDestination>(marshaller->unmarshalObject(mode, istream)) ;
deliverySequenceId = (marshaller->unmarshalLong(mode, istream)) ;
messageId = p_cast<MessageId>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -27,6 +27,7 @@
#include "activemq/command/ConsumerId.hpp"
#include "activemq/command/ActiveMQDestination.hpp"
#include "activemq/command/MessageId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -48,7 +49,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for MessageDispatchNotification
* Command and marshalling code for OpenWire format for MessageDispatchNotification
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -85,8 +86,8 @@ public:
virtual p<MessageId> getMessageId() ;
virtual void setMessageId(p<MessageId> messageId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for MessageId
* Command and marshalling code for OpenWire format for MessageId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -77,19 +77,21 @@ void MessageId::setBrokerSequenceId(long long brokerSequenceId)
this->brokerSequenceId = brokerSequenceId ;
}
int MessageId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int MessageId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalObject(producerId, mode, writer) ;
size += marshaller->marshalLong(producerSequenceId, mode, writer) ;
size += marshaller->marshalLong(brokerSequenceId, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalObject(producerId, mode, ostream) ;
size += marshaller->marshalLong(producerSequenceId, mode, ostream) ;
size += marshaller->marshalLong(brokerSequenceId, mode, ostream) ;
return size ;
}
void MessageId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void MessageId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
producerId = p_cast<ProducerId>(marshaller->unmarshalObject(mode, reader)) ;
producerSequenceId = (marshaller->unmarshalLong(mode, reader)) ;
brokerSequenceId = (marshaller->unmarshalLong(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
producerId = p_cast<ProducerId>(marshaller->unmarshalObject(mode, istream)) ;
producerSequenceId = (marshaller->unmarshalLong(mode, istream)) ;
brokerSequenceId = (marshaller->unmarshalLong(mode, istream)) ;
}

View File

@ -23,8 +23,9 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/ProducerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -46,7 +47,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for MessageId
* Command and marshalling code for OpenWire format for MessageId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -54,7 +55,7 @@ namespace apache
* activemq-core module
*
*/
class MessageId : public AbstractCommand
class MessageId : public BaseDataStructure
{
protected:
p<ProducerId> producerId ;
@ -79,8 +80,8 @@ public:
virtual long long getBrokerSequenceId() ;
virtual void setBrokerSequenceId(long long brokerSequenceId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

View File

@ -0,0 +1,83 @@
/*
* 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.
*/
#include "activemq/command/NetworkBridgeFilter.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for NetworkBridgeFilter
*
*
* 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
*
*/
NetworkBridgeFilter::NetworkBridgeFilter()
{
this->networkTTL = 0 ;
this->networkBrokerId = NULL ;
}
NetworkBridgeFilter::~NetworkBridgeFilter()
{
}
unsigned char NetworkBridgeFilter::getDataStructureType()
{
return NetworkBridgeFilter::TYPE ;
}
int NetworkBridgeFilter::getNetworkTTL()
{
return networkTTL ;
}
void NetworkBridgeFilter::setNetworkTTL(int networkTTL)
{
this->networkTTL = networkTTL ;
}
p<BrokerId> NetworkBridgeFilter::getNetworkBrokerId()
{
return networkBrokerId ;
}
void NetworkBridgeFilter::setNetworkBrokerId(p<BrokerId> networkBrokerId)
{
this->networkBrokerId = networkBrokerId ;
}
int NetworkBridgeFilter::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalInt(networkTTL, mode, ostream) ;
size += marshaller->marshalObject(networkBrokerId, mode, ostream) ;
return size ;
}
void NetworkBridgeFilter::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
networkTTL = (marshaller->unmarshalInt(mode, istream)) ;
networkBrokerId = p_cast<BrokerId>(marshaller->unmarshalObject(mode, istream)) ;
}

View File

@ -0,0 +1,88 @@
/*
* 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.
*/
#ifndef ActiveMQ_NetworkBridgeFilter_hpp_
#define ActiveMQ_NetworkBridgeFilter_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/command/BrokerId.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for NetworkBridgeFilter
*
*
* 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
*
*/
class NetworkBridgeFilter : public BaseDataStructure
{
protected:
int networkTTL ;
p<BrokerId> networkBrokerId ;
public:
const static unsigned char TYPE = 91;
public:
NetworkBridgeFilter() ;
virtual ~NetworkBridgeFilter() ;
virtual unsigned char getDataStructureType() ;
virtual int getNetworkTTL() ;
virtual void setNetworkTTL(int networkTTL) ;
virtual p<BrokerId> getNetworkBrokerId() ;
virtual void setNetworkBrokerId(p<BrokerId> networkBrokerId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_NetworkBridgeFilter_hpp_*/

View File

@ -0,0 +1,83 @@
/*
* 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.
*/
#include "activemq/command/PartialCommand.hpp"
using namespace apache::activemq::command;
/*
*
* Command and marshalling code for OpenWire format for PartialCommand
*
*
* 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
*
*/
PartialCommand::PartialCommand()
{
this->commandId = 0 ;
this->data = NULL ;
}
PartialCommand::~PartialCommand()
{
}
unsigned char PartialCommand::getDataStructureType()
{
return PartialCommand::TYPE ;
}
int PartialCommand::getCommandId()
{
return commandId ;
}
void PartialCommand::setCommandId(int commandId)
{
this->commandId = commandId ;
}
array<char> PartialCommand::getData()
{
return data ;
}
void PartialCommand::setData(array<char> data)
{
this->data = data ;
}
int PartialCommand::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalInt(commandId, mode, ostream) ;
size += marshaller->marshalByteArray(data, mode, ostream) ;
return size ;
}
void PartialCommand::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
commandId = (marshaller->unmarshalInt(mode, istream)) ;
data = (marshaller->unmarshalByteArray(mode, istream)) ;
}

View File

@ -0,0 +1,87 @@
/*
* 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.
*/
#ifndef ActiveMQ_PartialCommand_hpp_
#define ActiveMQ_PartialCommand_hpp_
// Turn off warning message for ignored exception specification
#ifdef _MSC_VER
#pragma warning( disable : 4290 )
#endif
#include <string>
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
#include "ppr/io/IOException.hpp"
#include "ppr/util/ifr/array"
#include "ppr/util/ifr/p"
namespace apache
{
namespace activemq
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq;
using namespace apache::activemq::protocol;
using namespace apache::ppr::io;
/*
*
* Command and marshalling code for OpenWire format for PartialCommand
*
*
* 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
*
*/
class PartialCommand : public BaseDataStructure
{
protected:
int commandId ;
array<char> data ;
public:
const static unsigned char TYPE = 60;
public:
PartialCommand() ;
virtual ~PartialCommand() ;
virtual unsigned char getDataStructureType() ;
virtual int getCommandId() ;
virtual void setCommandId(int commandId) ;
virtual array<char> getData() ;
virtual void setData(array<char> data) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */
}
}
}
#endif /*ActiveMQ_PartialCommand_hpp_*/

View File

@ -20,7 +20,7 @@ using namespace apache::activemq::command;
/*
*
* Marshalling code for Open Wire Format for ProducerId
* Command and marshalling code for OpenWire format for ProducerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -77,19 +77,21 @@ void ProducerId::setSessionId(long long sessionId)
this->sessionId = sessionId ;
}
int ProducerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException)
int ProducerId::marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException)
{
int size = 0 ;
size += marshaller->marshalString(connectionId, mode, writer) ;
size += marshaller->marshalLong(value, mode, writer) ;
size += marshaller->marshalLong(sessionId, mode, writer) ;
size += BaseDataStructure::marshal(marshaller, mode, ostream) ;
size += marshaller->marshalString(connectionId, mode, ostream) ;
size += marshaller->marshalLong(value, mode, ostream) ;
size += marshaller->marshalLong(sessionId, mode, ostream) ;
return size ;
}
void ProducerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException)
void ProducerId::unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException)
{
connectionId = p_cast<string>(marshaller->unmarshalString(mode, reader)) ;
value = (marshaller->unmarshalLong(mode, reader)) ;
sessionId = (marshaller->unmarshalLong(mode, reader)) ;
BaseDataStructure::unmarshal(marshaller, mode, istream) ;
connectionId = p_cast<string>(marshaller->unmarshalString(mode, istream)) ;
value = (marshaller->unmarshalLong(mode, istream)) ;
sessionId = (marshaller->unmarshalLong(mode, istream)) ;
}

View File

@ -23,7 +23,8 @@
#endif
#include <string>
#include "activemq/command/AbstractCommand.hpp"
#include "activemq/command/BaseDataStructure.hpp"
#include "activemq/protocol/IMarshaller.hpp"
#include "ppr/io/IOutputStream.hpp"
#include "ppr/io/IInputStream.hpp"
@ -45,7 +46,7 @@ namespace apache
/*
*
* Marshalling code for Open Wire Format for ProducerId
* Command and marshalling code for OpenWire format for ProducerId
*
*
* NOTE!: This file is autogenerated - do not modify!
@ -53,7 +54,7 @@ namespace apache
* activemq-core module
*
*/
class ProducerId : public AbstractCommand
class ProducerId : public BaseDataStructure
{
protected:
p<string> connectionId ;
@ -78,8 +79,8 @@ public:
virtual long long getSessionId() ;
virtual void setSessionId(long long sessionId) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> writer) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> reader) throw (IOException) ;
virtual int marshal(p<IMarshaller> marshaller, int mode, p<IOutputStream> ostream) throw (IOException) ;
virtual void unmarshal(p<IMarshaller> marshaller, int mode, p<IInputStream> istream) throw (IOException) ;
} ;
/* namespace */

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