Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Classes | Public Types | Public Member Functions
qpid::console::SessionManager Class Reference

#include <qpid/console/SessionManager.h>

List of all members.

Classes

struct  Settings

Public Types

typedef std::vector< std::stringNameVector
typedef std::vector< ClassKeyKeyVector

Public Member Functions

 ~SessionManager ()
 SessionManager (ConsoleListener *listener=0, Settings settings=Settings())
 Create a new SessionManager.
BrokeraddBroker (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.
SchemaClassgetSchema (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.

Member Typedef Documentation

Definition at line 54 of file SessionManager.h.

Definition at line 53 of file SessionManager.h.


Constructor & Destructor Documentation

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.

Parameters:
listenerListener object to receive asynchronous indications.
settings.rcvObjectsListener wishes to receive managed object data.
settings.rcvEventsListener wishes to receive events.
settings.rcvHeartbeatsListener wishes to receive agent heartbeats.
settings.userBindingsIf 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.

Member Function Documentation

Broker* qpid::console::SessionManager::addBroker ( client::ConnectionSettings settings)

Connect a broker to the console session.

Parameters:
settingsConnection settings for client access
Returns:
broker object if operation is successful an exception shall be thrown.
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.

Parameters:
classKeyClass key of class to which to bind.
void qpid::console::SessionManager::bindClass ( const std::string packageName,
const std::string className 
)
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.

Parameters:
classKeyClass key of event of interest
packageNameName of package of event of interest.
eventNameName of event of interest. Default=All events defined by package.
void qpid::console::SessionManager::bindEvent ( const std::string packageName,
const std::string eventName = "" 
)
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.

Parameters:
packageNameName of the package to which to bind.
void qpid::console::SessionManager::delBroker ( Broker broker)

Disconnect a broker from the console session.

Parameters:
brokerThe 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.

Parameters:
agentsVector of Agent objects returned by the session manager.
brokerReturn 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.

Parameters:
classKeysList of class keys returned by the session manager.
packageNameName 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.

Parameters:
objectsList of objects received.
classKeyClassKey object identifying class to be queried.
classNameClass name identifying class to be queried.
objectIdObject Id of the single object to be queried.
brokerRestrict the query to this broker, or all brokers if NULL.
agentRestrict the query to this agent, or all agents if NULL.
void qpid::console::SessionManager::getPackages ( NameVector packages)

Get a list of known management packages.

Parameters:
packagesVector 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.

Parameters:
classKeyClass key of the desired schema.

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu Aug 23 2012 for Qpid C++ Client API by doxygen 1.7.5