Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
#include <qpid/console/SessionManager.h>
Public Types | |
typedef std::vector< std::string > | NameVector |
typedef std::vector< ClassKey > | KeyVector |
Public Member Functions | |
~SessionManager () | |
SessionManager (ConsoleListener *listener=0, Settings settings=Settings()) | |
Create a new SessionManager. | |
Broker * | addBroker (client::ConnectionSettings &settings) |
Connect a broker to the console session. | |
void | delBroker (Broker *broker) |
Disconnect a broker from the console session. | |
void | getPackages (NameVector &packages) |
Get a list of known management packages. | |
void | getClasses (KeyVector &classKeys, const std::string &packageName) |
Get a list of class keys associated with a package. | |
SchemaClass & | getSchema (const ClassKey &classKey) |
Get the schema of a class given its class key. | |
void | bindPackage (const std::string &packageName) |
Request that updates be received for all classes within a package. | |
void | bindClass (const ClassKey &classKey) |
Request update to be received for a particular class. | |
void | bindClass (const std::string &packageName, const std::string &className) |
void | bindEvent (const ClassKey &classKey) |
Request events from a particular package. | |
void | bindEvent (const std::string &packageName, const std::string &eventName="") |
void | getAgents (Agent::Vector &agents, Broker *broker=0) |
Get a list of qmf agents known to the session manager. | |
void | getObjects (Object::Vector &objects, const std::string &className, Broker *broker=0, Agent *agent=0) |
Get objects from agents. | |
Classes | |
struct | Settings |
Definition at line 50 of file SessionManager.h.
typedef std::vector<ClassKey> qpid::console::SessionManager::KeyVector |
Definition at line 54 of file SessionManager.h.
typedef std::vector<std::string> qpid::console::SessionManager::NameVector |
Definition at line 53 of file SessionManager.h.
qpid::console::SessionManager::~SessionManager | ( | ) |
qpid::console::SessionManager::SessionManager | ( | ConsoleListener * | listener = 0 , |
|
Settings | settings = Settings() | |||
) |
Create a new SessionManager.
Provide your own subclass of ConsoleListener to receive updates and indications asynchronously or leave it as its default and use only synchronous methods.
listener | Listener object to receive asynchronous indications. | |
settings.rcvObjects | Listener wishes to receive managed object data. | |
settings.rcvEvents | Listener wishes to receive events. | |
settings.rcvHeartbeats | Listener wishes to receive agent heartbeats. | |
settings.userBindings | If rcvObjects is true, userBindings allows the console client to control which object classes are received. See the bindPackage and bindClass methods. If userBindings is false, the listener will receive updates for all object classes. |
Broker* qpid::console::SessionManager::addBroker | ( | client::ConnectionSettings & | settings | ) |
Connect a broker to the console session.
settings | Connection settings for client access |
void qpid::console::SessionManager::bindClass | ( | const std::string & | packageName, | |
const std::string & | className | |||
) |
void qpid::console::SessionManager::bindClass | ( | const ClassKey & | classKey | ) |
Request update to be received for a particular class.
Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.
classKey | Class key of class to which to bind. |
void qpid::console::SessionManager::bindEvent | ( | const std::string & | packageName, | |
const std::string & | eventName = "" | |||
) |
void qpid::console::SessionManager::bindEvent | ( | const ClassKey & | classKey | ) |
Request events from a particular package.
Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.
classKey | Class key of event of interest | |
packageName | Name of package of event of interest. | |
eventName | Name of event of interest. Default=All events defined by package. |
void qpid::console::SessionManager::bindPackage | ( | const std::string & | packageName | ) |
Request that updates be received for all classes within a package.
Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.
packageName | Name of the package to which to bind. |
void qpid::console::SessionManager::delBroker | ( | Broker * | broker | ) |
Disconnect a broker from the console session.
broker | The broker object returned from an earlier call to addBroker. |
void qpid::console::SessionManager::getAgents | ( | Agent::Vector & | agents, | |
Broker * | broker = 0 | |||
) |
Get a list of qmf agents known to the session manager.
agents | Vector of Agent objects returned by the session manager. | |
broker | Return agents registered with this broker only. If NULL, return agents from all connected brokers. |
void qpid::console::SessionManager::getClasses | ( | KeyVector & | classKeys, | |
const std::string & | packageName | |||
) |
Get a list of class keys associated with a package.
classKeys | List of class keys returned by the session manager. | |
packageName | Name of package being queried. |
void qpid::console::SessionManager::getObjects | ( | Object::Vector & | objects, | |
const std::string & | className, | |||
Broker * | broker = 0 , |
|||
Agent * | agent = 0 | |||
) |
Get objects from agents.
There are four variants of this method with different ways of specifying from which class objects are being queried.
objects | List of objects received. | |
classKey | ClassKey object identifying class to be queried. | |
className | Class name identifying class to be queried. | |
objectId | Object Id of the single object to be queried. | |
broker | Restrict the query to this broker, or all brokers if NULL. | |
agent | Restrict the query to this agent, or all agents if NULL. |
void qpid::console::SessionManager::getPackages | ( | NameVector & | packages | ) |
Get a list of known management packages.
packages | Vector of package names returned by the session manager. |
SchemaClass& qpid::console::SessionManager::getSchema | ( | const ClassKey & | classKey | ) |
Get the schema of a class given its class key.
classKey | Class key of the desired schema. |