Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

qmf::Connection Class Reference
[Qpid Management Framework C++ API]

The Connection class represents a connection to a QPID broker that can be used by agents and consoles, possibly multiple at the same time. More...

#include <qmf/Connection.h>

List of all members.

Public Member Functions

QMF_EXTERN Connection (const ConnectionSettings &settings, const ConnectionListener *listener=0)
 Creates a connection object and begins the process of attempting to connect to the QPID broker.
QMF_EXTERN ~Connection ()
 Destroys a connection, causing the connection to be closed.
QMF_EXTERN void setAdminState (bool enabled)
 Set the administrative state of the connection (enabled or disabled).
QMF_EXTERN ConnectionState getOperState () const
 Return the current operational state of the connection (up or down).
QMF_EXTERN const char * getLastError () const
 Get the error message from the last failure to connect.

Detailed Description

The Connection class represents a connection to a QPID broker that can be used by agents and consoles, possibly multiple at the same time.

Definition at line 74 of file Connection.h.


Constructor & Destructor Documentation

QMF_EXTERN qmf::Connection::Connection ( const ConnectionSettings settings,
const ConnectionListener listener = 0 
)

Creates a connection object and begins the process of attempting to connect to the QPID broker.

Parameters:
settings The settings that control how the connection is set up.
listener An optional pointer to a subclass of ConnectionListener to receive notifications of events related to this connection.
QMF_EXTERN qmf::Connection::~Connection (  ) 

Destroys a connection, causing the connection to be closed.


Member Function Documentation

QMF_EXTERN const char* qmf::Connection::getLastError (  )  const

Get the error message from the last failure to connect.

Returns:
Null-terminated string containing the error message.
QMF_EXTERN ConnectionState qmf::Connection::getOperState (  )  const

Return the current operational state of the connection (up or down).

Returns:
the current connection state.
QMF_EXTERN void qmf::Connection::setAdminState ( bool  enabled  ) 

Set the administrative state of the connection (enabled or disabled).

Parameters:
enabled True => enable connection, False => disable connection

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

Qpid C++ API Reference
Generated on Mon Jun 7 17:49:08 2010 for Qpid C++ Client API by doxygen 1.6.2-20100208