Ark Server API (ASE) - Wiki
|
#include <ActiveResult.h>
Public Member Functions | |
ActiveResultHolder () | |
ResultType & | data () |
Returns a reference to the actual result. | |
void | data (ResultType *pData) |
void | wait () |
Pauses the caller until the result becomes available. | |
bool | tryWait (long milliseconds) |
void | wait (long milliseconds) |
void | notify () |
Notifies the invoking thread that the result became available. | |
bool | failed () const |
std::string | error () const |
Exception * | exception () const |
void | error (const Exception &exc) |
Sets the exception. | |
void | error (const std::string &msg) |
Sets the exception. | |
Public Member Functions inherited from Poco::RefCountedObject | |
RefCountedObject () | |
void | duplicate () const |
void | release () const noexcept |
Increments the object's reference count. | |
int | referenceCount () const |
Protected Member Functions | |
~ActiveResultHolder () | |
Protected Member Functions inherited from Poco::RefCountedObject | |
virtual | ~RefCountedObject () |
Returns the reference count. | |
Private Attributes | |
ResultType * | _pData |
Exception * | _pExc |
Event | _event |
This class holds the result of an asynchronous method invocation. It is used to pass the result from the execution thread back to the invocation thread. The class uses reference counting for memory management. Do not use this class directly, use ActiveResult instead.
Definition at line 33 of file ActiveResult.h.
|
inline |
Definition at line 41 of file ActiveResult.h.
|
inlineprotected |
Definition at line 130 of file ActiveResult.h.
|
inline |
Returns a reference to the actual result.
Definition at line 49 of file ActiveResult.h.
|
inline |
Definition at line 56 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 97 of file ActiveResult.h.
|
inline |
Sets the exception.
Definition at line 115 of file ActiveResult.h.
|
inline |
Sets the exception.
Definition at line 122 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 108 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 90 of file ActiveResult.h.
|
inline |
Notifies the invoking thread that the result became available.
Definition at line 84 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 68 of file ActiveResult.h.
|
inline |
Pauses the caller until the result becomes available.
Definition at line 62 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 76 of file ActiveResult.h.
|
private |
Definition at line 139 of file ActiveResult.h.
|
private |
Definition at line 137 of file ActiveResult.h.
|
private |
Definition at line 138 of file ActiveResult.h.