ALBrokerManager is a class to manage brokers.
More...
#include <alcommon/albrokermanager.h>
List of all members.
Detailed Description
ALBrokerManager is a class to manage brokers.
It should be only singleton with various main pointer.
Definition at line 31 of file albrokermanager.h.
Member Function Documentation
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.
- Parameters:
-
pBroker | pointer to a broker |
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBroker |
( |
int |
i | ) |
|
Get a broker from index.
- Parameters:
-
- Returns:
- A pointer to the broker.
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByIPPort |
( |
const std::string & |
strEndPoint | ) |
|
Get a broker from IP and port address.
- Parameters:
-
strEndPoint | broker's address, format "127.0.0.1:5559/" |
- Returns:
- A pointer to the broker if we find it, a pointer to the first borker in the list otherwise.
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByIPPort |
( |
const std::string & |
strIP, |
|
|
int |
pPort |
|
) |
| |
Get a broker by port address.
- Parameters:
-
strIP | broker's IP (unused) |
pPort | broker's port |
- Returns:
- A pointer to the broker if we find it, a pointer to the first borker in the list otherwise.
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getBrokerByParentIPPort |
( |
const std::string & |
strIP, |
|
|
int |
pPort |
|
) |
| |
Get a broker by parent's broker port.
- Parameters:
-
strIP | broker's IP (unused) |
pPort | parent's port the broker |
- Returns:
- A pointer to the broker, boost::shared_ptr<ALBroker>() otherwise
static boost::shared_ptr<ALBrokerManager> AL::ALBrokerManager::getInstance |
( |
| ) |
|
|
static |
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getRandomBroker |
( |
void |
| ) |
|
Get the first broker in the list.
- Returns:
- A pointer to a broker, throw if broker's list is empty
- Exceptions:
-
boost::shared_ptr<ALBroker> AL::ALBrokerManager::getReservedBroker |
( |
void |
| ) |
|
Create a empty broker.
- Returns:
- A pointer to a Broker
void AL::ALBrokerManager::killAllBroker |
( |
void |
| ) |
|
Remove and shutdown all brokers.
- Warning:
- Program should not work any more after that.
void AL::ALBrokerManager::removeBroker |
( |
boost::shared_ptr< ALBroker > |
pBroker | ) |
|
Remove a broker from the map of broker.
- Warning:
- It will also shutdown the broker.
- Parameters:
-
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
- Parameters:
-
pBroker | pointer to a broker |
Set the ALBrokerManager singleton.
- Warning:
- It will kill the old singleton to replace it by the new one
- Parameters:
-
- Returns:
- A poitner to the new instance of the ALBrokerManager
The documentation for this class was generated from the following file: