qpid::console::SessionManager Class Reference

Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

## Member Typedef Documentation

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.

## 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:

  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.

## Member Function Documentation

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

Connect a broker to the console session.

Parameters:

  settings | Connection 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:

  classKey | Class 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:

  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::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:

  packageName | Name of the package to which to bind.

void qpid::console::SessionManager::delBroker | ( | Broker * | broker | ) |

Disconnect a broker from the console session.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  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.

Parameters:

  classKey | Class key of the desired schema.

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

- qpid/console/SessionManager.h