|
libalcommon
2.1.0.18
|
ALBrokerManager is a class to manage brokers. More...
#include <alcommon/albrokermanager.h>
Public Member Functions | |
| virtual | ~ALBrokerManager () |
| Destructor. | |
| void | addBroker (boost::shared_ptr< ALBroker > pBroker) |
| Add a Broker in the map of broker. | |
| void | removeBroker (boost::shared_ptr< ALBroker > pBroker) |
| Remove a broker from the map of broker. | |
| void | removeFromList (boost::shared_ptr< ALBroker > pBroker) |
| Remove a broker from the map of broker. | |
| boost::shared_ptr< ALBroker > | getBrokerByName (const std::string &brokerName) |
| Get the suitable broker. | |
| boost::shared_ptr< ALBroker > | getRandomBroker (void) |
| Get the first broker in the list. | |
| boost::shared_ptr< ALBroker > | getBroker (int i) |
| Get a broker from index. | |
| boost::shared_ptr< ALBroker > | getBrokerByIPPort (const std::string &strEndPoint) |
| Get a broker from IP and port address. | |
| boost::shared_ptr< ALBroker > | getBrokerByIPPort (const std::string &strIP, int pPort) |
| Get a broker by port address. | |
| boost::shared_ptr< ALBroker > | getBrokerByParentIPPort (const std::string &strIP, int pPort) |
| Get a broker by parent's broker port. | |
| void | killAllBroker (void) |
| Remove and shutdown all brokers. | |
| boost::shared_ptr< ALBroker > | getReservedBroker (void) |
| Create a empty broker. | |
Static Public Member Functions | |
| static boost::shared_ptr < ALBrokerManager > | getInstance () |
| Get the ALBrokerManager singleton. | |
| static boost::shared_ptr < ALBrokerManager > | setInstance (boost::shared_ptr< ALBrokerManager > pSingleton) |
| Set the ALBrokerManager singleton. | |
| static void | kill () |
| Reset the ALBrokerManager singleton. | |
Public Attributes | |
| ALBrokerManagerPrivate * | _p |
Protected Member Functions | |
| ALBrokerManager () | |
| Constructor. | |
| ALBrokerManager (const ALBrokerManager &) | |
| ALBrokerManager & | operator= (const ALBrokerManager &) |
ALBrokerManager is a class to manage brokers.
It should be only singleton with various main pointer.
Definition at line 32 of file albrokermanager.h.
| AL::ALBrokerManager::ALBrokerManager | ( | ) | [protected] |
Constructor.
| AL::ALBrokerManager::ALBrokerManager | ( | const ALBrokerManager & | ) | [protected] |
| virtual AL::ALBrokerManager::~ALBrokerManager | ( | ) | [virtual] |
Destructor.
| void AL::ALBrokerManager::addBroker | ( | boost::shared_ptr< ALBroker > | pBroker | ) |
Add a Broker in the map of broker.
Add a broker to the map if it do not already exist.
| pBroker | pointer to a broker |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBroker | ( | int | i | ) |
Get a broker from index.
| i | index to the broker |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByIPPort | ( | const std::string & | strEndPoint | ) |
Get a broker from IP and port address.
| strEndPoint | broker's address, format "127.0.0.1:5559/" |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByIPPort | ( | const std::string & | strIP, |
| int | pPort | ||
| ) |
Get a broker by port address.
| strIP | broker's IP (unused) |
| pPort | broker's port |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByName | ( | const std::string & | brokerName | ) |
Get the suitable broker.
| brokerName | name of wanted broker |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByParentIPPort | ( | const std::string & | strIP, |
| int | pPort | ||
| ) |
Get a broker by parent's broker port.
| strIP | broker's IP (unused) |
| pPort | parent's port the broker |
| static boost::shared_ptr<ALBrokerManager> AL::ALBrokerManager::getInstance | ( | ) | [static] |
Get the ALBrokerManager singleton.
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getRandomBroker | ( | void | ) |
Get the first broker in the list.
| ALERROR |
| boost::shared_ptr<ALBroker> AL::ALBrokerManager::getReservedBroker | ( | void | ) |
Create a empty broker.
| static void AL::ALBrokerManager::kill | ( | ) | [static] |
Reset the ALBrokerManager singleton.
| void AL::ALBrokerManager::killAllBroker | ( | void | ) |
Remove and shutdown all brokers.
| ALBrokerManager& AL::ALBrokerManager::operator= | ( | const ALBrokerManager & | ) | [protected] |
| void AL::ALBrokerManager::removeBroker | ( | boost::shared_ptr< ALBroker > | pBroker | ) |
Remove a broker from the map of broker.
| pBroker | pointer to a broker |
| void AL::ALBrokerManager::removeFromList | ( | boost::shared_ptr< ALBroker > | pBroker | ) |
Remove a broker from the map of broker.
It won't shutdown of the broker
| pBroker | pointer to a broker |
| static boost::shared_ptr<ALBrokerManager> AL::ALBrokerManager::setInstance | ( | boost::shared_ptr< ALBrokerManager > | pSingleton | ) | [static] |
Set the ALBrokerManager singleton.
| pSingleton | A pointer to a new ALBrokerManager |
| ALBrokerManagerPrivate* AL::ALBrokerManager::_p |
A pointer to the private implementation of ALBrokerManager.
Definition at line 151 of file albrokermanager.h.