Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Public Member Functions
qmf::engine::ConnectionSettings Class Reference

Settings for AMQP connections to the broker. More...

#include <qmf/engine/ConnectionSettings.h>

List of all members.

Public Member Functions

 ConnectionSettings ()
 Create a set of default connection settings.
 ConnectionSettings (const char *url)
 Create a set of connection settings by URL.
 ConnectionSettings (const ConnectionSettings &from)
 Copy Constructor.
 ~ConnectionSettings ()
 Destroy the connection settings object.
bool setAttr (const char *key, const Value &value)
 Set an attribute to control connection setup.
Value getAttr (const char *key) const
 Get the value of an attribute.
const char * getAttrString () const
 Get the attribute string (the portion of the URL following the '?') for the settings.
void transportTcp (uint16_t port=5672)
 Shortcuts for setting the transport for the connection.
void transportSsl (uint16_t port=5671)
void transportRdma (uint16_t port=5672)
void authAnonymous (const char *username=0)
 Shortcuts for setting authentication mechanisms.
void authPlain (const char *username=0, const char *password=0)
void authGssapi (const char *serviceName, uint32_t minSsf=0, uint32_t maxSsf=256)
void setRetry (int delayMin=1, int delayMax=128, int delayFactor=2)
 Shortcut for setting connection retry attributes.

Detailed Description

Settings for AMQP connections to the broker.

Definition at line 37 of file ConnectionSettings.h.


Constructor & Destructor Documentation

qmf::engine::ConnectionSettings::ConnectionSettings ( )

Create a set of default connection settings.

If no further attributes are set, the settings will cause a connection to be made to the default broker (on localhost or at a host/port supplied by service discovery) and authentication will be the best-available (GSSAPI/Kerberos, Anonymous, Plain with prompts for username and password).

qmf::engine::ConnectionSettings::ConnectionSettings ( const char *  url)

Create a set of connection settings by URL.

Parameters:
urlUniversal resource locator describing the broker address and additional attributes.

The URL is of the form: amqp[s]://host[:port][?key=value[&key=value]*]

For example: amqp://localhost amqp://broker?transport=rdma&authmech=GSSAPI&authservice=qpidd amqps://broker?authmech=PLAIN&authuser=guest&authpass=guest

qmf::engine::ConnectionSettings::ConnectionSettings ( const ConnectionSettings from)

Copy Constructor.

qmf::engine::ConnectionSettings::~ConnectionSettings ( )

Destroy the connection settings object.


Member Function Documentation

void qmf::engine::ConnectionSettings::authAnonymous ( const char *  username = 0)

Shortcuts for setting authentication mechanisms.

Parameters:
usernameNull-terminated authentication user name.
passwordNull-terminated authentication password.
serviceNameNull-terminated GSSAPI service name (Kerberos service principal)
minSsfMinimum security factor for connections. 0 = encryption not required.
maxSsfMaximum security factor for connections. 0 = encryption not permitted.
void qmf::engine::ConnectionSettings::authGssapi ( const char *  serviceName,
uint32_t  minSsf = 0,
uint32_t  maxSsf = 256 
)
void qmf::engine::ConnectionSettings::authPlain ( const char *  username = 0,
const char *  password = 0 
)
Value qmf::engine::ConnectionSettings::getAttr ( const char *  key) const

Get the value of an attribute.

Parameters:
keyA null-terminated attribute name.
Returns:
The value associated with the attribute name.
const char* qmf::engine::ConnectionSettings::getAttrString ( ) const

Get the attribute string (the portion of the URL following the '?') for the settings.

Returns:
A pointer to the attribute string. If the content of this string needs to be available beyond the scope of the calling function, it should be copied. The returned pointer may become invalid if the set of attributes is changed.
bool qmf::engine::ConnectionSettings::setAttr ( const char *  key,
const Value value 
)

Set an attribute to control connection setup.

Parameters:
keyA null-terminated string that is an attribute name.
valueReference to a value to be stored as the attribute. The type of the value is specific to the key.
Returns:
True if success, False if invalid attribute
void qmf::engine::ConnectionSettings::setRetry ( int  delayMin = 1,
int  delayMax = 128,
int  delayFactor = 2 
)

Shortcut for setting connection retry attributes.

Parameters:
delayMinMinimum delay (in seconds) between connection attempts.
delaxMaxMaximum delay (in seconds) between connection attempts.
delayFactorFactor to multiply the delay by between failed connection attempts.
void qmf::engine::ConnectionSettings::transportRdma ( uint16_t  port = 5672)
void qmf::engine::ConnectionSettings::transportSsl ( uint16_t  port = 5671)
void qmf::engine::ConnectionSettings::transportTcp ( uint16_t  port = 5672)

Shortcuts for setting the transport for the connection.

Parameters:
portThe port value for the connection address.

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

Qpid C++ API Reference
Generated on Mon Aug 22 2011 for Qpid C++ Client API by doxygen 1.7.4