11 #ifndef _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_
12 #define _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_
16 # include <boost/shared_ptr.hpp>
23 class ALBrokerManagerPrivate;
49 void addBroker(boost::shared_ptr<ALBroker> pBroker);
56 void removeBroker(boost::shared_ptr<ALBroker> pBroker);
64 void removeFromList(boost::shared_ptr<ALBroker> pBroker);
71 boost::shared_ptr<ALBroker> getBrokerByName(
const std::string &brokerName);
78 boost::shared_ptr<ALBroker> getRandomBroker(
void);
85 boost::shared_ptr<ALBroker> getBroker(
int i);
93 boost::shared_ptr<ALBroker> getBrokerByIPPort(
const std::string &strEndPoint);
103 boost::shared_ptr<ALBroker> getBrokerByIPPort(
const std::string &strIP,
112 boost::shared_ptr<ALBroker> getBrokerByParentIPPort(
const std::string &strIP,
int pPort);
118 void killAllBroker(
void);
124 boost::shared_ptr<ALBroker> getReservedBroker(
void);
130 static boost::shared_ptr<ALBrokerManager> getInstance();
138 static boost::shared_ptr<ALBrokerManager> setInstance(boost::shared_ptr<ALBrokerManager> pSingleton);
147 static boost::shared_ptr<ALBrokerManager> *_singleton;
151 ALBrokerManagerPrivate *
_p;
154 #endif // _LIBALCOMMON_ALCOMMON_ALBROKERMANAGER_H_
ALBrokerManager is a class to manage brokers.
ALBrokerManagerPrivate * _p