Ark Server API (ASE) - Wiki
|
#include <ActiveResult.h>
Public Types | |
typedef RT | ResultType |
typedef ActiveResultHolder< ResultType > | ActiveResultHolderType |
Public Member Functions | |
ActiveResult (ActiveResultHolderType *pHolder) | |
ActiveResult (const ActiveResult &result) | |
Copy constructor. | |
~ActiveResult () | |
Destroys the result. | |
ActiveResult & | operator= (const ActiveResult &result) |
Assignment operator. | |
void | swap (ActiveResult &result) |
ResultType & | data () const |
Returns a reference to the result data. | |
void | data (ResultType *pValue) |
void | wait () |
Pauses the caller until the result becomes available. | |
bool | tryWait (long milliseconds) |
void | wait (long milliseconds) |
bool | available () const |
Returns true if a result is available. | |
bool | failed () const |
std::string | error () const |
Exception * | exception () const |
void | notify () |
ResultType & | data () |
void | error (const std::string &msg) |
Sets the failed flag and the exception message. | |
void | error (const Exception &exc) |
Sets the failed flag and the exception message. | |
Private Member Functions | |
ActiveResult () | |
Private Attributes | |
ActiveResultHolderType * | _pHolder |
This class holds the result of an asynchronous method invocation (see class ActiveMethod). It is used to pass the result from the execution thread back to the invocation thread.
Definition at line 235 of file ActiveResult.h.
typedef ActiveResultHolder<ResultType> Poco::ActiveResult< RT >::ActiveResultHolderType |
Definition at line 242 of file ActiveResult.h.
typedef RT Poco::ActiveResult< RT >::ResultType |
Definition at line 241 of file ActiveResult.h.
|
inline |
Definition at line 244 of file ActiveResult.h.
|
inline |
Copy constructor.
Definition at line 251 of file ActiveResult.h.
|
inline |
Destroys the result.
Definition at line 258 of file ActiveResult.h.
|
private |
|
inline |
Returns true if a result is available.
Definition at line 311 of file ActiveResult.h.
|
inline |
Returns a non-const reference to the result data. For internal use only.
Definition at line 346 of file ActiveResult.h.
|
inline |
Returns a reference to the result data.
Definition at line 278 of file ActiveResult.h.
|
inline |
Definition at line 284 of file ActiveResult.h.
|
inline |
If the active method threw an exception, a textual representation of the exception is returned. An empty string is returned if the active method completed successfully.
Definition at line 324 of file ActiveResult.h.
|
inline |
Sets the failed flag and the exception message.
Definition at line 359 of file ActiveResult.h.
|
inline |
Sets the failed flag and the exception message.
Definition at line 353 of file ActiveResult.h.
|
inline |
If the active method threw an exception, a clone of the exception object is returned, otherwise null.
Definition at line 332 of file ActiveResult.h.
|
inline |
Returns true if the active method failed (and threw an exception). Information about the exception can be obtained by calling error().
Definition at line 317 of file ActiveResult.h.
|
inline |
Notifies the invoking thread that the result became available. For internal use only.
Definition at line 339 of file ActiveResult.h.
|
inline |
Assignment operator.
Definition at line 264 of file ActiveResult.h.
|
inline |
Definition at line 272 of file ActiveResult.h.
|
inline |
Waits up to the specified interval for the result to become available. Returns true if the result became available, false otherwise.
Definition at line 295 of file ActiveResult.h.
|
inline |
Pauses the caller until the result becomes available.
Definition at line 289 of file ActiveResult.h.
|
inline |
Waits up to the specified interval for the result to become available. Throws a TimeoutException if the result did not became available.
Definition at line 303 of file ActiveResult.h.
|
private |
Definition at line 368 of file ActiveResult.h.