mirror of https://github.com/apache/activemq.git
Latest generated openwire
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384828 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5c4ca193be
commit
73f173852c
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* 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 "command/LastPartialCommand.hpp"
|
||||
|
||||
using namespace apache::activemq::client::command;
|
||||
|
||||
/*
|
||||
*
|
||||
* Marshalling code for Open Wire 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()
|
||||
{
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/*
* 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 LastPartialCommand_hpp_
#define LastPartialCommand_hpp_
#include <string>
#include "command/PartialCommand.hpp"
#include "util/ifr/ap.hpp"
#include "util/ifr/p.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq::client;
/*
*
* Marshalling code for Open Wire 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
{
private:
public:
const static int TYPE = 61;
public:
LastPartialCommand() ;
virtual ~LastPartialCommand() ;
virtual int getCommandType() ;
} ;
/* namespace */
}
}
}
}
#endif /*LastPartialCommand_hpp_*/
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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 "command/PartialCommand.hpp"
|
||||
|
||||
using namespace apache::activemq::client::command;
|
||||
|
||||
/*
|
||||
*
|
||||
* Marshalling code for Open Wire 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->data = 0 ;
|
||||
}
|
||||
|
||||
PartialCommand::~PartialCommand()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ap<char> PartialCommand::getData()
|
||||
{
|
||||
return data ;
|
||||
}
|
||||
|
||||
void PartialCommand::setData(ap<char> data)
|
||||
{
|
||||
this->data = data ;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/*
* 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 PartialCommand_hpp_
#define PartialCommand_hpp_
#include <string>
#include "command/BaseCommand.hpp"
#include "util/ifr/ap.hpp"
#include "util/ifr/p.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq::client;
/*
*
* Marshalling code for Open Wire 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 BaseCommand
{
private:
ap<char> data ;
public:
const static int TYPE = 60;
public:
PartialCommand() ;
virtual ~PartialCommand() ;
virtual int getCommandType() ;
virtual ap<char> getData() ;
virtual void setData(ap<char> data) ;
} ;
/* namespace */
}
}
}
}
#endif /*PartialCommand_hpp_*/
|
|
@ -30,8 +30,32 @@ using namespace apache::activemq::client::command;
|
|||
*/
|
||||
ReplayCommand::ReplayCommand()
|
||||
{
|
||||
this->firstNakNumber = 0 ;
|
||||
this->lastNakNumber = 0 ;
|
||||
}
|
||||
|
||||
ReplayCommand::~ReplayCommand()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int ReplayCommand::getFirstNakNumber()
|
||||
{
|
||||
return firstNakNumber ;
|
||||
}
|
||||
|
||||
void ReplayCommand::setFirstNakNumber(int firstNakNumber)
|
||||
{
|
||||
this->firstNakNumber = firstNakNumber ;
|
||||
}
|
||||
|
||||
|
||||
int ReplayCommand::getLastNakNumber()
|
||||
{
|
||||
return lastNakNumber ;
|
||||
}
|
||||
|
||||
void ReplayCommand::setLastNakNumber(int lastNakNumber)
|
||||
{
|
||||
this->lastNakNumber = lastNakNumber ;
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
/*
* 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 ReplayCommand_hpp_
#define ReplayCommand_hpp_
#include <string>
#include "command/BaseCommand.hpp"
#include "util/ifr/ap.hpp"
#include "util/ifr/p.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq::client;
/*
*
* Marshalling code for Open Wire Format for ReplayCommand
*
*
* 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 ReplayCommand : public BaseCommand
{
private:
public:
const static int TYPE = 38;
public:
ReplayCommand() ;
virtual ~ReplayCommand() ;
virtual int getCommandType() ;
} ;
/* namespace */
}
}
}
}
#endif /*ReplayCommand_hpp_*/
|
||||
/*
* 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 ReplayCommand_hpp_
#define ReplayCommand_hpp_
#include <string>
#include "command/BaseCommand.hpp"
#include "util/ifr/ap.hpp"
#include "util/ifr/p.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace command
{
using namespace ifr;
using namespace std;
using namespace apache::activemq::client;
/*
*
* Marshalling code for Open Wire Format for ReplayCommand
*
*
* 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 ReplayCommand : public BaseCommand
{
private:
int firstNakNumber ;
int lastNakNumber ;
public:
const static int TYPE = 65;
public:
ReplayCommand() ;
virtual ~ReplayCommand() ;
virtual int getCommandType() ;
virtual int getFirstNakNumber() ;
virtual void setFirstNakNumber(int firstNakNumber) ;
virtual int getLastNakNumber() ;
virtual void setLastNakNumber(int lastNakNumber) ;
} ;
/* namespace */
}
}
}
}
#endif /*ReplayCommand_hpp_*/
|
|
@ -38,12 +38,12 @@ Response::~Response()
|
|||
}
|
||||
|
||||
|
||||
short Response::getCorrelationId()
|
||||
int Response::getCorrelationId()
|
||||
{
|
||||
return correlationId ;
|
||||
}
|
||||
|
||||
void Response::setCorrelationId(short correlationId)
|
||||
void Response::setCorrelationId(int correlationId)
|
||||
{
|
||||
this->correlationId = correlationId ;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace apache
|
|||
class Response : public BaseCommand
|
||||
{
|
||||
private:
|
||||
short correlationId ;
|
||||
int correlationId ;
|
||||
|
||||
public:
|
||||
const static int TYPE = 30;
|
||||
|
@ -60,8 +60,8 @@ public:
|
|||
|
||||
virtual int getCommandType() ;
|
||||
|
||||
virtual short getCorrelationId() ;
|
||||
virtual void setCorrelationId(short correlationId) ;
|
||||
virtual int getCorrelationId() ;
|
||||
virtual void setCorrelationId(int correlationId) ;
|
||||
|
||||
|
||||
} ;
|
||||
|
|
|
@ -45,7 +45,7 @@ void BaseCommandMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, Bina
|
|||
base.unmarshal(wireFormat, o, dataIn, bs);
|
||||
|
||||
BaseCommand& info = (BaseCommand&) o;
|
||||
info.setCommandId(dataIn.readShort());
|
||||
info.setCommandId(dataIn.readInt());
|
||||
info.setResponseRequired(bs.readBoolean());
|
||||
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ void BaseCommandMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, Bina
|
|||
base.marshal2(wireFormat, o, dataOut, bs);
|
||||
|
||||
BaseCommand& info = (BaseCommand&) o;
|
||||
DataStreamMarshaller.writeShort(info.getCommandId(), dataOut);
|
||||
DataStreamMarshaller.writeInt(info.getCommandId(), dataOut);
|
||||
bs.readBoolean();
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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 "marshal/LastPartialCommandMarshaller.hpp"
|
||||
|
||||
using namespace apache::activemq::client::marshal;
|
||||
|
||||
/*
|
||||
* Marshalling code for Open Wire 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
|
||||
*/
|
||||
|
||||
LastPartialCommandMarshaller::LastPartialCommandMarshaller()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
LastPartialCommandMarshaller::~LastPartialCommandMarshaller()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
|
||||
IDataStructure* LastPartialCommandMarshaller::createObject()
|
||||
{
|
||||
return new LastPartialCommand();
|
||||
}
|
||||
|
||||
char LastPartialCommandMarshaller::getDataStructureType()
|
||||
{
|
||||
return LastPartialCommand.ID_LastPartialCommand;
|
||||
}
|
||||
|
||||
/*
|
||||
* Un-marshal an object instance from the data input stream
|
||||
*/
|
||||
void LastPartialCommandMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs)
|
||||
{
|
||||
base.unmarshal(wireFormat, o, dataIn, bs);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the booleans that this object uses to a BooleanStream
|
||||
*/
|
||||
int LastPartialCommandMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) {
|
||||
LastPartialCommand& info = (LastPartialCommand&) o;
|
||||
|
||||
int rc = base.marshal1(wireFormat, info, bs);
|
||||
|
||||
return rc + 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a object instance to data output stream
|
||||
*/
|
||||
void LastPartialCommandMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) {
|
||||
base.marshal2(wireFormat, o, dataOut, bs);
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/*
* 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 LastPartialCommandMarshaller_hpp_
#define LastPartialCommandMarshaller_hpp_
#include <string>
#include "command/IDataStructure.hpp"
/* we could cut this down - for now include all possible headers */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#include "command/SessionId.hpp"
#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"
#include "command/PartialCommandMarshaller.hpp"
#include "util/ifr/p.hpp"
#include "protocol/ProtocolFormat.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace marshal
{
using namespace ifr ;
using namespace apache::activemq::client::command;
using namespace apache::activemq::client::io;
using namespace apache::activemq::client::protocol;
/*
*
*/
class LastPartialCommandMarshaller : public PartialCommandMarshaller
{
public:
LastPartialCommandMarshaller() ;
virtual ~LastPartialCommandMarshaller() ;
virtual IDataStructure* createCommand() ;
virtual char getDataStructureType() ;
virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
virtual int marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) ;
virtual void marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;
/* namespace */
}
}
}
}
#endif /*LastPartialCommandMarshaller_hpp_*/
|
|
@ -26,6 +26,7 @@
|
|||
#include "marshal/ExceptionResponseMarshaller.hpp"
|
||||
|
||||
#include "marshal/LocalTransactionIdMarshaller.hpp"
|
||||
#include "marshal/PartialCommandMarshaller.hpp"
|
||||
#include "marshal/IntegerResponseMarshaller.hpp"
|
||||
#include "marshal/ActiveMQQueueMarshaller.hpp"
|
||||
#include "marshal/ActiveMQObjectMessageMarshaller.hpp"
|
||||
|
@ -54,6 +55,7 @@
|
|||
#include "marshal/SubscriptionInfoMarshaller.hpp"
|
||||
#include "marshal/JournalTransactionMarshaller.hpp"
|
||||
#include "marshal/ControlCommandMarshaller.hpp"
|
||||
#include "marshal/LastPartialCommandMarshaller.hpp"
|
||||
#include "marshal/NetworkBridgeFilterMarshaller.hpp"
|
||||
#include "marshal/ActiveMQBytesMessageMarshaller.hpp"
|
||||
#include "marshal/WireFormatInfoMarshaller.hpp"
|
||||
|
@ -83,6 +85,7 @@ void MarshallerFactory::configure(ProtocolFormat& format)
|
|||
{
|
||||
|
||||
format.addMarshaller(new LocalTransactionIdMarshaller());
|
||||
format.addMarshaller(new PartialCommandMarshaller());
|
||||
format.addMarshaller(new IntegerResponseMarshaller());
|
||||
format.addMarshaller(new ActiveMQQueueMarshaller());
|
||||
format.addMarshaller(new ActiveMQObjectMessageMarshaller());
|
||||
|
@ -111,6 +114,7 @@ void MarshallerFactory::configure(ProtocolFormat& format)
|
|||
format.addMarshaller(new SubscriptionInfoMarshaller());
|
||||
format.addMarshaller(new JournalTransactionMarshaller());
|
||||
format.addMarshaller(new ControlCommandMarshaller());
|
||||
format.addMarshaller(new LastPartialCommandMarshaller());
|
||||
format.addMarshaller(new NetworkBridgeFilterMarshaller());
|
||||
format.addMarshaller(new ActiveMQBytesMessageMarshaller());
|
||||
format.addMarshaller(new WireFormatInfoMarshaller());
|
||||
|
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* 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 "marshal/PartialCommandMarshaller.hpp"
|
||||
|
||||
using namespace apache::activemq::client::marshal;
|
||||
|
||||
/*
|
||||
* Marshalling code for Open Wire 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
|
||||
*/
|
||||
|
||||
PartialCommandMarshaller::PartialCommandMarshaller()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
PartialCommandMarshaller::~PartialCommandMarshaller()
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
||||
|
||||
|
||||
IDataStructure* PartialCommandMarshaller::createObject()
|
||||
{
|
||||
return new PartialCommand();
|
||||
}
|
||||
|
||||
char PartialCommandMarshaller::getDataStructureType()
|
||||
{
|
||||
return PartialCommand.ID_PartialCommand;
|
||||
}
|
||||
|
||||
/*
|
||||
* Un-marshal an object instance from the data input stream
|
||||
*/
|
||||
void PartialCommandMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs)
|
||||
{
|
||||
base.unmarshal(wireFormat, o, dataIn, bs);
|
||||
|
||||
PartialCommand& info = (PartialCommand&) o;
|
||||
info.setData(tightUnmarshalByteArray(dataIn, bs));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Write the booleans that this object uses to a BooleanStream
|
||||
*/
|
||||
int PartialCommandMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) {
|
||||
PartialCommand& info = (PartialCommand&) o;
|
||||
|
||||
int rc = base.marshal1(wireFormat, info, bs);
|
||||
bs.writeBoolean(info.getData()!=null);
|
||||
rc += info.getData()==null ? 0 : info.getData().Length+4;
|
||||
|
||||
return rc + 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write a object instance to data output stream
|
||||
*/
|
||||
void PartialCommandMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) {
|
||||
base.marshal2(wireFormat, o, dataOut, bs);
|
||||
|
||||
PartialCommand& info = (PartialCommand&) o;
|
||||
if(bs.readBoolean()) {
|
||||
DataStreamMarshaller.writeInt(info.getData().Length, dataOut);
|
||||
dataOut.write(info.getData());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/*
* 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 PartialCommandMarshaller_hpp_
#define PartialCommandMarshaller_hpp_
#include <string>
#include "command/IDataStructure.hpp"
/* we could cut this down - for now include all possible headers */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include "command/ProducerId.hpp"
#include "command/SessionId.hpp"
#include "io/BinaryReader.hpp"
#include "io/BinaryWriter.hpp"
#include "command/BaseCommandMarshaller.hpp"
#include "util/ifr/p.hpp"
#include "protocol/ProtocolFormat.hpp"
namespace apache
{
namespace activemq
{
namespace client
{
namespace marshal
{
using namespace ifr ;
using namespace apache::activemq::client::command;
using namespace apache::activemq::client::io;
using namespace apache::activemq::client::protocol;
/*
*
*/
class PartialCommandMarshaller : public BaseCommandMarshaller
{
public:
PartialCommandMarshaller() ;
virtual ~PartialCommandMarshaller() ;
virtual IDataStructure* createCommand() ;
virtual char getDataStructureType() ;
virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader& dataIn, BooleanStream& bs) ;
virtual int marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream& bs) ;
virtual void marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;
/* namespace */
}
}
}
}
#endif /*PartialCommandMarshaller_hpp_*/
|
|
@ -55,6 +55,10 @@ void ReplayCommandMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, Bi
|
|||
{
|
||||
base.unmarshal(wireFormat, o, dataIn, bs);
|
||||
|
||||
ReplayCommand& info = (ReplayCommand&) o;
|
||||
info.setFirstNakNumber(dataIn.readInt());
|
||||
info.setLastNakNumber(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,7 +70,7 @@ int ReplayCommandMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, Boo
|
|||
|
||||
int rc = base.marshal1(wireFormat, info, bs);
|
||||
|
||||
return rc + 0;
|
||||
return rc + 2;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -75,4 +79,8 @@ int ReplayCommandMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, Boo
|
|||
void ReplayCommandMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter& dataOut, BooleanStream& bs) {
|
||||
base.marshal2(wireFormat, o, dataOut, bs);
|
||||
|
||||
ReplayCommand& info = (ReplayCommand&) o;
|
||||
DataStreamMarshaller.writeInt(info.getFirstNakNumber(), dataOut);
|
||||
DataStreamMarshaller.writeInt(info.getLastNakNumber(), dataOut);
|
||||
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ void ResponseMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryR
|
|||
base.unmarshal(wireFormat, o, dataIn, bs);
|
||||
|
||||
Response& info = (Response&) o;
|
||||
info.setCorrelationId(dataIn.readShort());
|
||||
info.setCorrelationId(dataIn.readInt());
|
||||
|
||||
}
|
||||
|
||||
|
@ -79,6 +79,6 @@ void ResponseMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryW
|
|||
base.marshal2(wireFormat, o, dataOut, bs);
|
||||
|
||||
Response& info = (Response&) o;
|
||||
DataStreamMarshaller.writeShort(info.getCorrelationId(), dataOut);
|
||||
DataStreamMarshaller.writeInt(info.getCorrelationId(), dataOut);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue