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

qpid::messaging::Session Class Reference

A session represents a distinct 'conversation' which can involve sending and receiving messages from different sources and sinks. More...

#include <qpid/messaging/Session.h>

List of all members.

Public Member Functions

 Session (SessionImpl *impl=0)
 Session (const Session &)
 ~Session ()
Sessionoperator= (const Session &)
void close ()
void commit ()
void rollback ()
void acknowledge ()
 Acknowledges all outstanding messages that have been received by the application on this session.
void reject (Message &)
 Rejects the specified message.
void sync ()
void flush ()
uint32_t available ()
 Returns the number of messages received and waiting to be fetched.
uint32_t pendingAck ()
 Returns a count of the number of messages received this session that have been acknowledged, but for which that acknowledgement has not yet been confirmed as processed by the server.
bool fetch (Message &message, qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE)
Message fetch (qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE)
bool dispatch (qpid::sys::Duration timeout=qpid::sys::TIME_INFINITE)
Sender createSender (const Address &address, const VariantMap &options=VariantMap())
Sender createSender (const std::string &address, const VariantMap &options=VariantMap())
Receiver createReceiver (const Address &address, const VariantMap &options=VariantMap())
Receiver createReceiver (const Address &address, const Filter &filter, const VariantMap &options=VariantMap())
Receiver createReceiver (const std::string &address, const VariantMap &options=VariantMap())
Receiver createReceiver (const std::string &address, const Filter &filter, const VariantMap &options=VariantMap())
Address createTempQueue (const std::string &baseName=std::string())
bool isValid () const
bool isNull () const
 operator bool () const
 Conversion to bool supports idiom if (handle) { handle->.
bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< SessionImpl > &h)

Protected Types

typedef SessionImpl Impl

Protected Attributes

Implimpl

Detailed Description

A session represents a distinct 'conversation' which can involve sending and receiving messages from different sources and sinks.

Definition at line 51 of file Session.h.


Member Typedef Documentation

typedef SessionImpl qpid::client::Handle< SessionImpl >::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::messaging::Session::Session ( SessionImpl *  impl = 0  ) 
qpid::messaging::Session::Session ( const Session  ) 
qpid::messaging::Session::~Session (  ) 

Member Function Documentation

void qpid::messaging::Session::acknowledge (  ) 

Acknowledges all outstanding messages that have been received by the application on this session.

uint32_t qpid::messaging::Session::available (  ) 

Returns the number of messages received and waiting to be fetched.

void qpid::messaging::Session::close (  ) 
void qpid::messaging::Session::commit (  ) 
Receiver qpid::messaging::Session::createReceiver ( const std::string &  address,
const Filter filter,
const VariantMap options = VariantMap() 
)
Receiver qpid::messaging::Session::createReceiver ( const std::string &  address,
const VariantMap options = VariantMap() 
)
Receiver qpid::messaging::Session::createReceiver ( const Address address,
const Filter filter,
const VariantMap options = VariantMap() 
)
Receiver qpid::messaging::Session::createReceiver ( const Address address,
const VariantMap options = VariantMap() 
)
Sender qpid::messaging::Session::createSender ( const std::string &  address,
const VariantMap options = VariantMap() 
)
Sender qpid::messaging::Session::createSender ( const Address address,
const VariantMap options = VariantMap() 
)
Address qpid::messaging::Session::createTempQueue ( const std::string &  baseName = std::string()  ) 
bool qpid::messaging::Session::dispatch ( qpid::sys::Duration  timeout = qpid::sys::TIME_INFINITE  ) 
Message qpid::messaging::Session::fetch ( qpid::sys::Duration  timeout = qpid::sys::TIME_INFINITE  ) 
bool qpid::messaging::Session::fetch ( Message message,
qpid::sys::Duration  timeout = qpid::sys::TIME_INFINITE 
)
void qpid::messaging::Session::flush (  ) 
bool qpid::client::Handle< SessionImpl >::isNull (  )  const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

References qpid::client::Handle< T >::impl.

bool qpid::client::Handle< SessionImpl >::isValid (  )  const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

References qpid::client::Handle< T >::impl.

qpid::client::Handle< SessionImpl >::operator bool (  )  const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->.

.. }

Definition at line 49 of file Handle.h.

References qpid::client::Handle< T >::impl.

bool qpid::client::Handle< SessionImpl >::operator! (  )  const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

References qpid::client::Handle< T >::impl.

Session& qpid::messaging::Session::operator= ( const Session  ) 
uint32_t qpid::messaging::Session::pendingAck (  ) 

Returns a count of the number of messages received this session that have been acknowledged, but for which that acknowledgement has not yet been confirmed as processed by the server.

void qpid::messaging::Session::reject ( Message  ) 

Rejects the specified message.

This will prevent the message being redelivered.

void qpid::messaging::Session::rollback (  ) 
void qpid::client::Handle< SessionImpl >::swap ( Handle< SessionImpl > &  h  )  [inline, inherited]

Definition at line 54 of file Handle.h.

References qpid::client::Handle< T >::impl.

void qpid::messaging::Session::sync (  ) 

Member Data Documentation

Impl* qpid::client::Handle< SessionImpl >::impl [protected, inherited]

Definition at line 64 of file Handle.h.


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

Qpid C++ API Reference
Generated on Wed Dec 2 18:10:37 2009 for Qpid C++ Client API by doxygen 1.6.1