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

qpid::client::TypedResult< T > Class Template Reference
[Qpid C++ Client API]

Returned by asynchronous commands that return a result. More...

#include <TypedResult.h>

List of all members.

Public Member Functions

 TypedResult (Future f, shared_ptr< SessionImpl > s)
T & get ()
 Wait for the asynchronous command that returned this TypedResult to complete and return its result.
void wait ()
 Wait for the asynchronous command that returned this Completion to complete.
bool isComplete ()

Protected Attributes

Future future
shared_ptr< SessionImplsession


Detailed Description

template<class T>
class qpid::client::TypedResult< T >

Returned by asynchronous commands that return a result.

You can use get() to wait for completion and get the result value.

Definition at line 35 of file TypedResult.h.


Constructor & Destructor Documentation

template<class T >
qpid::client::TypedResult< T >::TypedResult ( Future  f,
shared_ptr< SessionImpl s 
) [inline]

Definition at line 42 of file TypedResult.h.


Member Function Documentation

template<class T >
T& qpid::client::TypedResult< T >::get (  )  [inline]

Wait for the asynchronous command that returned this TypedResult to complete and return its result.

Returns:
The result returned by the command.
Exceptions:
If the command returns an error, get() throws an exception.

Definition at line 52 of file TypedResult.h.

References qpid::client::Future::decodeResult(), qpid::client::Completion::future, and qpid::client::Completion::session.

bool qpid::client::Completion::isComplete (  )  [inline, inherited]

void qpid::client::Completion::wait (  )  [inline, inherited]

Wait for the asynchronous command that returned this Completion to complete.

Exceptions:
If the command returns an error, get() throws an exception.

Definition at line 59 of file Completion.h.

References qpid::client::Completion::future, qpid::client::Completion::session, and qpid::client::Future::wait().


Member Data Documentation

Future qpid::client::Completion::future [protected, inherited]

shared_ptr<SessionImpl> qpid::client::Completion::session [protected, inherited]


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

Qpid C++ API Reference
Generated on Mon Mar 16 13:47:29 2009 for Qpid C++ Client API by doxygen 1.5.8