activemq::core::ActiveMQConnectionFactory Class Reference

#include <ActiveMQConnectionFactory.h>

List of all members.

Public Member Functions

 ActiveMQConnectionFactory (void)
 ActiveMQConnectionFactory (const std::string &url, const std::string &username="", const std::string &password="", const std::string &clientId="")
virtual ~ActiveMQConnectionFactory (void)
virtual cms::Connection * createConnection (void) throw ( cms::CMSException )
virtual cms::Connection * createConnection (const std::string &username, const std::string &password, const std::string &clientId="") throw ( cms::CMSException )
virtual void setUsername (const std::string &username)
virtual const std::string & getUsername (void) const
virtual void setPassword (const std::string &password)
virtual const std::string & getPassword (void) const
virtual void setBrokerURL (const std::string &brokerURL)
virtual const std::string & getBrokerURL (void) const
virtual void setClientId (const std::string &clientId)
virtual const std::string & getClientId (void) const

Protected Member Functions

virtual void parseURL (const std::string &URI, util::Properties &properties) throw ( exceptions::IllegalArgumentException )

Private Attributes

std::string username
std::string password
std::string clientId
std::string brokerURL


Constructor & Destructor Documentation

ActiveMQConnectionFactory::ActiveMQConnectionFactory (  void   ) 
 

ActiveMQConnectionFactory::ActiveMQConnectionFactory (  const std::string &  url,
const std::string &  username = "",
const std::string &  password = "",
const std::string &  clientId = ""
) 
 

Constructor

Parameters:
url the URL of the Broker we are connecting to.
username to authenticate with, defaults to ""
password to authenticate with, defaults to ""
clientId to assign to connection, defaults to ""

virtual activemq::core::ActiveMQConnectionFactory::~ActiveMQConnectionFactory (  void   )  [inline, virtual]
 


Member Function Documentation

cms::Connection * ActiveMQConnectionFactory::createConnection (  const std::string &  username,
const std::string &  password,
const std::string &  clientId = ""
)  throw ( cms::CMSException ) [virtual]
 

Creates a connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Parameters:
username to authenticate with, defaults to ""
password to authenticate with, defaults to ""
clientId to assign to connection, defaults to ""
Exceptions:
CMSException. 

cms::Connection * ActiveMQConnectionFactory::createConnection (  void   )  throw ( cms::CMSException ) [virtual]
 

Creates a connection with the default user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

Returns:
a Connection Pointer
Exceptions:
CMSException 

virtual const std::string& activemq::core::ActiveMQConnectionFactory::getBrokerURL (  void   )  const [inline, virtual]
 

Gets the Broker URL that this factory will use when creating a new connection instance.

Returns:
brokerURL string

virtual const std::string& activemq::core::ActiveMQConnectionFactory::getClientId (  void   )  const [inline, virtual]
 

Gets the Client Id that this factory will use when creating a new connection instance.

Returns:
clientId string

virtual const std::string& activemq::core::ActiveMQConnectionFactory::getPassword (  void   )  const [inline, virtual]
 

Gets the password that this factory will use when creating a new connection instance.

Returns:
password string, "" for default credentials

virtual const std::string& activemq::core::ActiveMQConnectionFactory::getUsername (  void   )  const [inline, virtual]
 

Gets the username that this factory will use when creating a new connection instance.

Returns:
username string, "" for default credentials

void ActiveMQConnectionFactory::parseURL (  const std::string &  URI,
util::Properties &  properties
)  throw ( exceptions::IllegalArgumentException ) [protected, virtual]
 

Parses the properties out of the provided Broker URI and sets them in the passed Properties Object.

Parameters:
URI a Broker URI to parse
properties a Properties object to set the parsed values in
Exceptions:
IllegalArgumentException if the passed URI is invalid

virtual void activemq::core::ActiveMQConnectionFactory::setBrokerURL (  const std::string &  brokerURL  )  [inline, virtual]
 

Sets the Broker URL that should be used when creating a new connection instance

Parameters:
brokerURL string

virtual void activemq::core::ActiveMQConnectionFactory::setClientId (  const std::string &  clientId  )  [inline, virtual]
 

Sets the Client Id that should be used when creating a new connection instance

Parameters:
clientId string

virtual void activemq::core::ActiveMQConnectionFactory::setPassword (  const std::string &  password  )  [inline, virtual]
 

Sets the password that should be used when creating a new connection

Parameters:
password string

virtual void activemq::core::ActiveMQConnectionFactory::setUsername (  const std::string &  username  )  [inline, virtual]
 

Sets the username that should be used when creating a new connection

Parameters:
username string


Member Data Documentation

std::string activemq::core::ActiveMQConnectionFactory::brokerURL [private]
 

std::string activemq::core::ActiveMQConnectionFactory::clientId [private]
 

std::string activemq::core::ActiveMQConnectionFactory::password [private]
 

std::string activemq::core::ActiveMQConnectionFactory::username [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