activemq-cpp-3.6.0
activemq::cmsutil::ResourceLifecycleManager Class Reference

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 &)
ResourceLifecycleManageroperator= (const ResourceLifecycleManager &)

Detailed Description

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.

Constructor & Destructor Documentation

activemq::cmsutil::ResourceLifecycleManager::ResourceLifecycleManager ( const ResourceLifecycleManager )
protected
activemq::cmsutil::ResourceLifecycleManager::ResourceLifecycleManager ( )
virtual activemq::cmsutil::ResourceLifecycleManager::~ResourceLifecycleManager ( )
virtual

Destructor - calls destroy

Member Function Documentation

void activemq::cmsutil::ResourceLifecycleManager::addConnection ( cms::Connection connection)

Adds a connection so that its life will be managed by this object.

Parameters
connectionthe object to be managed
Exceptions
CMSExceptionif 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.

Parameters
destthe object to be managed
Exceptions
CMSExceptionif 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.

Parameters
consumerthe object to be managed
Exceptions
CMSExceptionif 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.

Parameters
producerthe object to be managed
Exceptions
CMSExceptionif 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.

Parameters
sessionthe object to be managed
Exceptions
CMSExceptionif an error occurs while performing this operation.
void activemq::cmsutil::ResourceLifecycleManager::destroy ( )

Closes and destroys the contained CMS resources.

Exceptions
cms::CMSExceptionthrown 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.


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