activemq-cpp-3.9.5
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 ResourceLifecycleManagergetResourceLifecycleManager () const
 
virtual void setConnectionFactory (cms::ConnectionFactory *connectionFactory)
 Set the ConnectionFactory to use for obtaining CMS Connections.
 
virtual const cms::ConnectionFactorygetConnectionFactory () 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

◆ CmsAccessor() [1/2]

activemq::cmsutil::CmsAccessor::CmsAccessor ( const CmsAccessor & )
protected

References CmsAccessor().

Referenced by CmsAccessor(), and operator=().

◆ CmsAccessor() [2/2]

activemq::cmsutil::CmsAccessor::CmsAccessor ( )

◆ ~CmsAccessor()

virtual activemq::cmsutil::CmsAccessor::~CmsAccessor ( )
virtual

Member Function Documentation

◆ checkConnectionFactory()

virtual void activemq::cmsutil::CmsAccessor::checkConnectionFactory ( )
protectedvirtual

Verifies that the connection factory is valid.

Exceptions
IllegalStateExceptionif this object has not been initialized.

◆ createConnection()

virtual cms::Connection * activemq::cmsutil::CmsAccessor::createConnection ( )
protectedvirtual

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.

◆ createSession()

virtual cms::Session * activemq::cmsutil::CmsAccessor::createSession ( cms::Connection * con)
protectedvirtual

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.

◆ destroy()

virtual void activemq::cmsutil::CmsAccessor::destroy ( )
inlineprotectedvirtual

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.

◆ getConnectionFactory() [1/2]

virtual cms::ConnectionFactory * activemq::cmsutil::CmsAccessor::getConnectionFactory ( )
inlinevirtual

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

◆ getConnectionFactory() [2/2]

virtual const cms::ConnectionFactory * activemq::cmsutil::CmsAccessor::getConnectionFactory ( ) const
inlinevirtual

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

◆ getResourceLifecycleManager() [1/2]

virtual ResourceLifecycleManager * activemq::cmsutil::CmsAccessor::getResourceLifecycleManager ( )
inlinevirtual

◆ getResourceLifecycleManager() [2/2]

virtual const ResourceLifecycleManager * activemq::cmsutil::CmsAccessor::getResourceLifecycleManager ( ) const
inlinevirtual

◆ getSessionAcknowledgeMode()

virtual cms::Session::AcknowledgeMode activemq::cmsutil::CmsAccessor::getSessionAcknowledgeMode ( ) const
inlinevirtual

Return the acknowledgment mode for CMS sessions.

Returns
the acknowledgment mode applied by this accessor

◆ init()

virtual void activemq::cmsutil::CmsAccessor::init ( )
protectedvirtual

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.

◆ operator=()

CmsAccessor & activemq::cmsutil::CmsAccessor::operator= ( const CmsAccessor & )
protected

References CmsAccessor().

◆ setConnectionFactory()

virtual void activemq::cmsutil::CmsAccessor::setConnectionFactory ( cms::ConnectionFactory * connectionFactory)
inlinevirtual

Set the ConnectionFactory to use for obtaining CMS Connections.

◆ setSessionAcknowledgeMode()

virtual void activemq::cmsutil::CmsAccessor::setSessionAcknowledgeMode ( cms::Session::AcknowledgeMode sessionAcknowledgeMode)
inlinevirtual

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: