Added client control commands

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@393918 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-04-13 20:20:35 +00:00
parent 2e035301e2
commit ef276909f1
10 changed files with 99 additions and 0 deletions

View File

@ -35,6 +35,8 @@ BrokerInfo::BrokerInfo()
this->peerBrokerInfos = 0 ;
this->brokerName = 0 ;
this->slaveBroker = 0 ;
this->masterBroker = 0 ;
this->faultTolerantConfiguration = 0 ;
}
BrokerInfo::~BrokerInfo()
@ -95,3 +97,25 @@ void BrokerInfo::setSlaveBroker(bool slaveBroker)
{
this->slaveBroker = slaveBroker ;
}
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 ;
}

View File

@ -56,6 +56,8 @@ private:
ap<BrokerInfo> peerBrokerInfos ;
p<string> brokerName ;
bool slaveBroker ;
bool masterBroker ;
bool faultTolerantConfiguration ;
public:
const static int TYPE = 2;
@ -81,6 +83,12 @@ public:
virtual bool getSlaveBroker() ;
virtual void setSlaveBroker(bool slaveBroker) ;
virtual bool getMasterBroker() ;
virtual void setMasterBroker(bool masterBroker) ;
virtual bool getFaultTolerantConfiguration() ;
virtual void setFaultTolerantConfiguration(bool faultTolerantConfiguration) ;
} ;

View File

@ -35,6 +35,8 @@ ConnectionInfo::ConnectionInfo()
this->password = 0 ;
this->userName = 0 ;
this->brokerPath = 0 ;
this->brokerMasterConnector = 0 ;
this->manageable = 0 ;
}
ConnectionInfo::~ConnectionInfo()
@ -95,3 +97,25 @@ void ConnectionInfo::setBrokerPath(ap<BrokerId> brokerPath)
{
this->brokerPath = brokerPath ;
}
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 ;
}

View File

@ -56,6 +56,8 @@ private:
p<string> password ;
p<string> userName ;
ap<BrokerId> brokerPath ;
bool brokerMasterConnector ;
bool manageable ;
public:
const static int TYPE = 3;
@ -81,6 +83,12 @@ public:
virtual ap<BrokerId> getBrokerPath() ;
virtual void setBrokerPath(ap<BrokerId> brokerPath) ;
virtual bool getBrokerMasterConnector() ;
virtual void setBrokerMasterConnector(bool brokerMasterConnector) ;
virtual bool getManageable() ;
virtual void setManageable(bool manageable) ;
} ;

View File

@ -45,6 +45,7 @@ ConsumerInfo::ConsumerInfo()
this->brokerPath = 0 ;
this->additionalPredicate = 0 ;
this->networkSubscription = 0 ;
this->optimizedAcknowledge = 0 ;
}
ConsumerInfo::~ConsumerInfo()
@ -215,3 +216,14 @@ void ConsumerInfo::setNetworkSubscription(bool networkSubscription)
{
this->networkSubscription = networkSubscription ;
}
bool ConsumerInfo::getOptimizedAcknowledge()
{
return optimizedAcknowledge ;
}
void ConsumerInfo::setOptimizedAcknowledge(bool optimizedAcknowledge)
{
this->optimizedAcknowledge = optimizedAcknowledge ;
}

View File

@ -68,6 +68,7 @@ private:
ap<BrokerId> brokerPath ;
p<BooleanExpression> additionalPredicate ;
bool networkSubscription ;
bool optimizedAcknowledge ;
public:
const static int TYPE = 5;
@ -123,6 +124,9 @@ public:
virtual bool getNetworkSubscription() ;
virtual void setNetworkSubscription(bool networkSubscription) ;
virtual bool getOptimizedAcknowledge() ;
virtual void setOptimizedAcknowledge(bool optimizedAcknowledge) ;
} ;

View File

@ -72,6 +72,8 @@ void BrokerInfoMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, Binar
}
info.setBrokerName(tightUnmarshalString(dataIn, bs));
info.setSlaveBroker(bs.readBoolean());
info.setMasterBroker(bs.readBoolean());
info.setFaultTolerantConfiguration(bs.readBoolean());
}
@ -88,6 +90,8 @@ int BrokerInfoMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, Boolea
rc += marshalObjectArray(wireFormat, info.getPeerBrokerInfos(), bs);
rc += writeString(info.getBrokerName(), bs);
bs.writeBoolean(info.isSlaveBroker());
bs.writeBoolean(info.isMasterBroker());
bs.writeBoolean(info.isFaultTolerantConfiguration());
return rc + 0;
}
@ -104,5 +108,7 @@ void BrokerInfoMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, Binar
marshalObjectArray(wireFormat, info.getPeerBrokerInfos(), dataOut, bs);
writeString(info.getBrokerName(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
bs.readBoolean();
}

View File

@ -72,6 +72,8 @@ void ConnectionInfoMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, B
else {
info.setBrokerPath(null);
}
info.setBrokerMasterConnector(bs.readBoolean());
info.setManageable(bs.readBoolean());
}
@ -88,6 +90,8 @@ int ConnectionInfoMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, Bo
rc += writeString(info.getPassword(), bs);
rc += writeString(info.getUserName(), bs);
rc += marshalObjectArray(wireFormat, info.getBrokerPath(), bs);
bs.writeBoolean(info.isBrokerMasterConnector());
bs.writeBoolean(info.isManageable());
return rc + 0;
}
@ -104,5 +108,7 @@ void ConnectionInfoMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, B
writeString(info.getPassword(), dataOut, bs);
writeString(info.getUserName(), dataOut, bs);
marshalObjectArray(wireFormat, info.getBrokerPath(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
}

View File

@ -82,6 +82,7 @@ void ConsumerInfoMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, Bin
}
info.setAdditionalPredicate((org.apache.activemq.filter.BooleanExpression) tightUnmarsalNestedObject(wireFormat, dataIn, bs));
info.setNetworkSubscription(bs.readBoolean());
info.setOptimizedAcknowledge(bs.readBoolean());
}
@ -105,6 +106,7 @@ int ConsumerInfoMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, Bool
rc += marshalObjectArray(wireFormat, info.getBrokerPath(), bs);
rc += marshal1NestedObject(wireFormat, info.getAdditionalPredicate(), bs);
bs.writeBoolean(info.isNetworkSubscription());
bs.writeBoolean(info.isOptimizedAcknowledge());
return rc + 3;
}
@ -131,5 +133,6 @@ void ConsumerInfoMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, Bin
marshalObjectArray(wireFormat, info.getBrokerPath(), dataOut, bs);
marshal2NestedObject(wireFormat, info.getAdditionalPredicate(), dataOut, bs);
bs.readBoolean();
bs.readBoolean();
}

View File

@ -67,8 +67,10 @@
#include "marshal/DestinationInfoMarshaller.hpp"
#include "marshal/ShutdownInfoMarshaller.hpp"
#include "marshal/DataResponseMarshaller.hpp"
#include "marshal/ConnectionControlMarshaller.hpp"
#include "marshal/KeepAliveInfoMarshaller.hpp"
#include "marshal/FlushCommandMarshaller.hpp"
#include "marshal/ConsumerControlMarshaller.hpp"
#include "marshal/JournalTopicAckMarshaller.hpp"
#include "marshal/BrokerIdMarshaller.hpp"
#include "marshal/MessageDispatchMarshaller.hpp"
@ -126,8 +128,10 @@ void MarshallerFactory::configure(ProtocolFormat& format)
format.addMarshaller(new DestinationInfoMarshaller());
format.addMarshaller(new ShutdownInfoMarshaller());
format.addMarshaller(new DataResponseMarshaller());
format.addMarshaller(new ConnectionControlMarshaller());
format.addMarshaller(new KeepAliveInfoMarshaller());
format.addMarshaller(new FlushCommandMarshaller());
format.addMarshaller(new ConsumerControlMarshaller());
format.addMarshaller(new JournalTopicAckMarshaller());
format.addMarshaller(new BrokerIdMarshaller());
format.addMarshaller(new MessageDispatchMarshaller());