activemq::core::ActiveMQConnection Class Reference

#include <ActiveMQConnection.h>

Inheritance diagram for activemq::core::ActiveMQConnection:

activemq::connector::ConsumerMessageListener List of all members.

Public Member Functions

 ActiveMQConnection (ActiveMQConnectionData *connectionData)
virtual ~ActiveMQConnection (void)
virtual cms::Session * createSession (void) throw ( cms::CMSException )
virtual cms::Session * createSession (cms::Session::AcknowledgeMode ackMode) throw ( cms::CMSException )
virtual std::string getClientId (void) const
virtual ActiveMQConnectionDatagetConnectionData (void)
virtual cms::ExceptionListener * getExceptionListener (void) const
virtual void setExceptionListener (cms::ExceptionListener *listener)
virtual void close (void) throw ( cms::CMSException )
virtual void start (void) throw ( cms::CMSException )
virtual void stop (void) throw ( cms::CMSException )
virtual void addMessageListener (const unsigned int consumerId, ActiveMQMessageListener *listener)
virtual void removeMessageListener (const unsigned int consumerId)

Private Member Functions

void fire (exceptions::ActiveMQException &ex)
virtual void onConsumerMessage (connector::ConsumerInfo *consumer, core::ActiveMQMessage *message)

Private Attributes

cms::ExceptionListener * exceptionListener
ActiveMQConnectionDataconnectionData
bool started
bool closed
std::map< unsigned int, ActiveMQMessageListener * > consumers
concurrent::Mutex mutex

Constructor & Destructor Documentation

ActiveMQConnection::ActiveMQConnection ActiveMQConnectionData connectionData  ) 
 

Constructor

Parameters:
Pointer to an ActiveMQConnectionData object, owned here

ActiveMQConnection::~ActiveMQConnection void   )  [virtual]
 


Member Function Documentation

void ActiveMQConnection::addMessageListener const unsigned int  consumerId,
ActiveMQMessageListener listener
[virtual]
 

Adds the ActiveMQMessageListener to the Mapping of Consumer Id's to listeners, all message to that id will be routed to the given listener

Parameters:
consumerId Consumer Id String
listener ActiveMQMessageListener Pointer

void ActiveMQConnection::close void   )  throw ( cms::CMSException ) [virtual]
 

Close the currently open connection

Exceptions:
CMSException 

cms::Session * ActiveMQConnection::createSession cms::Session::AcknowledgeMode  ackMode  )  throw ( cms::CMSException ) [virtual]
 

Creates a new Session to work for this Connection using the specified acknowledgment mode

Parameters:
ackMode the Acknowledgement Mode to use.
Exceptions:
CMSException 

cms::Session * ActiveMQConnection::createSession void   )  throw ( cms::CMSException ) [virtual]
 

Creates a new Session to work for this Connection

Exceptions:
CMSException 

void activemq::core::ActiveMQConnection::fire exceptions::ActiveMQException ex  )  [inline, private]
 

Notify the excpetion listener

Parameters:
ex the exception to fire

std::string ActiveMQConnection::getClientId void   )  const [virtual]
 

Get the Client Id for this session

Returns:
string version of Client Id

virtual ActiveMQConnectionData* activemq::core::ActiveMQConnection::getConnectionData void   )  [inline, virtual]
 

Retrieves the Connection Data object for this object.

Returns:
pointer to a connection data object.

virtual cms::ExceptionListener* activemq::core::ActiveMQConnection::getExceptionListener void   )  const [inline, virtual]
 

Gets the registered Exception Listener for this connection

Returns:
pointer to an exception listnener or NULL

void ActiveMQConnection::onConsumerMessage connector::ConsumerInfo consumer,
core::ActiveMQMessage message
[private, virtual]
 

Called to dispatch a message to a particular consumer.

Parameters:
consumer the target consumer of the dispatch.
message the message to be dispatched.

Implements activemq::connector::ConsumerMessageListener.

void ActiveMQConnection::removeMessageListener const unsigned int  consumerId  )  [virtual]
 

Remove the Listener for the specified Consumer Id

Parameters:
consumerId Consumer Id string

virtual void activemq::core::ActiveMQConnection::setExceptionListener cms::ExceptionListener *  listener  )  [inline, virtual]
 

Sets the registed Exception Listener for this connection

Parameters:
listener pointer to and ExceptionListener

void ActiveMQConnection::start void   )  throw ( cms::CMSException ) [virtual]
 

Starts or (restarts) a connections delivery of incoming messages

Exceptions:
CMSException 

void ActiveMQConnection::stop void   )  throw ( cms::CMSException ) [virtual]
 

Stop the flow of incoming messages

Exceptions:
CMSException 


Member Data Documentation

bool activemq::core::ActiveMQConnection::closed [private]
 

ActiveMQConnectionData* activemq::core::ActiveMQConnection::connectionData [private]
 

std::map< unsigned int, ActiveMQMessageListener* > activemq::core::ActiveMQConnection::consumers [private]
 

cms::ExceptionListener* activemq::core::ActiveMQConnection::exceptionListener [private]
 

concurrent::Mutex activemq::core::ActiveMQConnection::mutex [private]
 

bool activemq::core::ActiveMQConnection::started [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Aug 3 18:03:32 2006 for activemq-cpp by  doxygen 1.4.5