activemq-cpp-3.4.0
|
Manages the lifecycle of a set of CMS resources. More...
#include <src/main/activemq/cmsutil/ResourceLifecycleManager.h>
Public Member Functions | |
ResourceLifecycleManager () | |
virtual | ~ResourceLifecycleManager () |
Destructor - calls destroy | |
void | addConnection (cms::Connection *connection) |
Adds a connection so that its life will be managed by this object. | |
void | addSession (cms::Session *session) |
Adds a session so that its life will be managed by this object. | |
void | addDestination (cms::Destination *dest) |
Adds a destination so that its life will be managed by this object. | |
void | addMessageProducer (cms::MessageProducer *producer) |
Adds a message producer so that its life will be managed by this object. | |
void | addMessageConsumer (cms::MessageConsumer *consumer) |
Adds a message consumer so that its life will be managed by this object. | |
void | destroy () |
Closes and destroys the contained CMS resources. | |
void | releaseAll () |
Releases all of the contained resources so that this object will no longer control their lifetimes. | |
Protected Member Functions | |
ResourceLifecycleManager (const ResourceLifecycleManager &) | |
ResourceLifecycleManager & | operator= (const ResourceLifecycleManager &) |
Manages the lifecycle of a set of CMS resources.
A call to destroy
will close and destroy all of the contained resources in the appropriate manner.
activemq::cmsutil::ResourceLifecycleManager::ResourceLifecycleManager | ( | const ResourceLifecycleManager & | ) | [protected] |
activemq::cmsutil::ResourceLifecycleManager::ResourceLifecycleManager | ( | ) |
virtual activemq::cmsutil::ResourceLifecycleManager::~ResourceLifecycleManager | ( | ) | [virtual] |
Destructor - calls destroy
void activemq::cmsutil::ResourceLifecycleManager::addConnection | ( | cms::Connection * | connection | ) |
Adds a connection so that its life will be managed by this object.
connection | the object to be managed |
CMSException | if an error occurs while performing this operation. |
void activemq::cmsutil::ResourceLifecycleManager::addDestination | ( | cms::Destination * | dest | ) |
Adds a destination so that its life will be managed by this object.
dest | the object to be managed |
CMSException | if an error occurs while performing this operation. |
void activemq::cmsutil::ResourceLifecycleManager::addMessageConsumer | ( | cms::MessageConsumer * | consumer | ) |
Adds a message consumer so that its life will be managed by this object.
consumer | the object to be managed |
CMSException | if an error occurs while performing this operation. |
void activemq::cmsutil::ResourceLifecycleManager::addMessageProducer | ( | cms::MessageProducer * | producer | ) |
Adds a message producer so that its life will be managed by this object.
producer | the object to be managed |
CMSException | if an error occurs while performing this operation. |
void activemq::cmsutil::ResourceLifecycleManager::addSession | ( | cms::Session * | session | ) |
Adds a session so that its life will be managed by this object.
session | the object to be managed |
CMSException | if an error occurs while performing this operation. |
void activemq::cmsutil::ResourceLifecycleManager::destroy | ( | ) |
Closes and destroys the contained CMS resources.
cms::CMSException | thrown if an error occurs. |
ResourceLifecycleManager& activemq::cmsutil::ResourceLifecycleManager::operator= | ( | const ResourceLifecycleManager & | ) | [protected] |
void activemq::cmsutil::ResourceLifecycleManager::releaseAll | ( | ) |
Releases all of the contained resources so that this object will no longer control their lifetimes.