activemq-cpp-3.4.0

activemq::cmsutil::CmsAccessor Class Reference

Base class for activemq.cmsutil.CmsTemplate and other CMS-accessing gateway helpers, defining common properties such as the CMS cms.ConnectionFactory to operate on. More...

#include <src/main/activemq/cmsutil/CmsAccessor.h>

Inheritance diagram for activemq::cmsutil::CmsAccessor:

Public Member Functions

 CmsAccessor ()
virtual ~CmsAccessor ()
virtual ResourceLifecycleManagergetResourceLifecycleManager ()
virtual const
ResourceLifecycleManager
getResourceLifecycleManager () const
virtual void setConnectionFactory (cms::ConnectionFactory *connectionFactory)
 Set the ConnectionFactory to use for obtaining CMS Connections.
virtual const
cms::ConnectionFactory
getConnectionFactory () const
 Return the ConnectionFactory that this accessor uses for obtaining CMS Connections.
virtual cms::ConnectionFactorygetConnectionFactory ()
 Return the ConnectionFactory that this accessor uses for obtaining CMS Connections.
virtual void setSessionAcknowledgeMode (cms::Session::AcknowledgeMode sessionAcknowledgeMode)
 Set the CMS acknowledgment mode that is used when creating a CMS Session to send a message.
virtual
cms::Session::AcknowledgeMode 
getSessionAcknowledgeMode () const
 Return the acknowledgment mode for CMS sessions.

Protected Member Functions

 CmsAccessor (const CmsAccessor &)
CmsAccessoroperator= (const CmsAccessor &)
virtual void init ()
 Initializes this object and prepares it for use.
virtual void destroy ()
 Shuts down this object and destroys any allocated resources.
virtual cms::ConnectioncreateConnection ()
 Create a CMS Connection via this template's ConnectionFactory.
virtual cms::SessioncreateSession (cms::Connection *con)
 Create a CMS Session for the given Connection.
virtual void checkConnectionFactory ()
 Verifies that the connection factory is valid.

Detailed Description

Base class for activemq.cmsutil.CmsTemplate and other CMS-accessing gateway helpers, defining common properties such as the CMS cms.ConnectionFactory to operate on.

The subclass activemq.cmsutil.CmsDestinationAccessor adds further, destination-related properties.

Not intended to be used directly.

See also:
activemq.cmsutil.CmsDestinationAccessor
activemq.cmsutil.CmsTemplate

Constructor & Destructor Documentation

activemq::cmsutil::CmsAccessor::CmsAccessor ( const CmsAccessor ) [protected]
activemq::cmsutil::CmsAccessor::CmsAccessor ( )
virtual activemq::cmsutil::CmsAccessor::~CmsAccessor ( ) [virtual]

Member Function Documentation

virtual void activemq::cmsutil::CmsAccessor::checkConnectionFactory ( ) [protected, virtual]

Verifies that the connection factory is valid.

Exceptions:
IllegalStateExceptionif this object has not been initialized.
virtual cms::Connection* activemq::cmsutil::CmsAccessor::createConnection ( ) [protected, virtual]

Create a CMS Connection via this template's ConnectionFactory.

Returns:
the new CMS Connection
Exceptions:
CMSExceptionif thrown by CMS API methods
IllegalStateExceptionif this object has not been initialized.
virtual cms::Session* activemq::cmsutil::CmsAccessor::createSession ( cms::Connection con) [protected, virtual]

Create a CMS Session for the given Connection.

Parameters:
conThe CMS Connection to create a Session for
Returns:
the new CMS Session
Exceptions:
CMSExceptionif thrown by CMS API methods
IllegalStateExceptionif this object has not been initialized.
virtual void activemq::cmsutil::CmsAccessor::destroy ( ) [inline, protected, virtual]

Shuts down this object and destroys any allocated resources.

Exceptions:
CMSExceptionif an error occurs during destruction.
IllegalStateExceptionif this object has already been destroyed.

Reimplemented in activemq::cmsutil::CmsDestinationAccessor, and activemq::cmsutil::CmsTemplate.

virtual const cms::ConnectionFactory* activemq::cmsutil::CmsAccessor::getConnectionFactory ( ) const [inline, virtual]

Return the ConnectionFactory that this accessor uses for obtaining CMS Connections.

virtual cms::ConnectionFactory* activemq::cmsutil::CmsAccessor::getConnectionFactory ( ) [inline, virtual]

Return the ConnectionFactory that this accessor uses for obtaining CMS Connections.

virtual ResourceLifecycleManager* activemq::cmsutil::CmsAccessor::getResourceLifecycleManager ( ) [inline, virtual]
virtual const ResourceLifecycleManager* activemq::cmsutil::CmsAccessor::getResourceLifecycleManager ( ) const [inline, virtual]
virtual cms::Session::AcknowledgeMode activemq::cmsutil::CmsAccessor::getSessionAcknowledgeMode ( ) const [inline, virtual]

Return the acknowledgment mode for CMS sessions.

Returns:
the acknowledgment mode applied by this accessor
virtual void activemq::cmsutil::CmsAccessor::init ( ) [protected, virtual]

Initializes this object and prepares it for use.

This should be called before any other methods are called. This version does nothing.

Exceptions:
CMSExceptionif an error occurs during initialization.
IllegalStateExceptionif this object has already been initialized.

Reimplemented in activemq::cmsutil::CmsDestinationAccessor, and activemq::cmsutil::CmsTemplate.

CmsAccessor& activemq::cmsutil::CmsAccessor::operator= ( const CmsAccessor ) [protected]
virtual void activemq::cmsutil::CmsAccessor::setConnectionFactory ( cms::ConnectionFactory connectionFactory) [inline, virtual]

Set the ConnectionFactory to use for obtaining CMS Connections.

virtual void activemq::cmsutil::CmsAccessor::setSessionAcknowledgeMode ( cms::Session::AcknowledgeMode  sessionAcknowledgeMode) [inline, virtual]

Set the CMS acknowledgment mode that is used when creating a CMS Session to send a message.

Default is AUTO_ACKNOWLEDGE.

Parameters:
sessionAcknowledgeModeThe acknowledgment mode to assign to the Session.

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