This is a specialization for RPC calls with the return type of void, where the get() method does not return a value.
More...
#include <rpc/RPCFuture.h>
|
| RPCFuture () |
|
| RPCFuture (boost::unique_future< void > other, AbstractRPCClient *client, const std::string &callId) |
| internally used by RPCClient More...
|
|
| RPCFuture (RPCFuture &&other) noexcept |
| move constructor More...
|
|
RPCFuture & | operator= (RPCFuture &&other) noexcept |
| move assignment operator More...
|
|
void | get (bool throwXRPC=true, bool recursive=true) |
| Waits until the call has finished and will raise an exception if the call has failed. More...
|
|
const std::string & | callId () |
| query call ID More...
|
|
bool | isReady () const |
| Checks to see if the result of the RPC call associated with this future is set. More...
|
|
bool | hasException () const |
| Returns true if the RPC call associated with this future has finished with an exception rather than a return value. More...
|
|
bool | hasValue () const |
| Returns true if the RPC call associated with this future has finished with a return value value rather than an exception. More...
|
|
void | wait () const |
| Waits and blocks the current thread until the result of the associated RPC call is ready. More...
|
|
bool | timedWait (Duration const &relTime) const |
| Waits and blocks the current thread until the result of the associated RPC call is ready, or the time duration specified by waitDuration has elapsed. More...
|
|
bool | timedWaitUntil (boost::system_time const &absTime) const |
| Waits and blocks the current thread until the result of the associated RPC call is ready, or the time point specified by waitDuration has passed. More...
|
|
void | swap (RPCFutureCommon< void > &other) |
| Swaps ownership of the asynchronous results associated with other and *this. More...
|
|
template<>
class mira::RPCFuture< void >
This is a specialization for RPC calls with the return type of void, where the get() method does not return a value.
- See also
- RPCFuture, RPCFuture<R>
◆ RPCFuture() [1/3]
◆ RPCFuture() [2/3]
◆ RPCFuture() [3/3]
◆ operator=()
◆ get()
void get |
( |
bool |
throwXRPC = true , |
|
|
bool |
recursive = true |
|
) |
| |
|
inline |
Waits until the call has finished and will raise an exception if the call has failed.
- Parameters
-
[in] | throwXRPC | throw XRPC instead of original exception that occured in the called function (default = true, for backward compatibility) |
[in] | recursive | recurse to innermost exception (for nested XRPC, only if throwXRPC=false) |
- Note
- This method will block until the call has finished.
-
This method will throw if an exception occurred on the server side while processing the call.
-
Depending on configuration of boost future, it may be illegal to call this more than once on the same object.
- See also
- wait(), timedWait(), hasValue(), hasException()
◆ callId()
const std::string& callId |
( |
| ) |
|
|
inlineinherited |
◆ isReady()
Checks to see if the result of the RPC call associated with this future is set.
◆ hasException()
bool hasException |
( |
| ) |
const |
|
inlineinherited |
Returns true if the RPC call associated with this future has finished with an exception rather than a return value.
◆ hasValue()
Returns true if the RPC call associated with this future has finished with a return value value rather than an exception.
◆ wait()
Waits and blocks the current thread until the result of the associated RPC call is ready.
This is an interruption point.
◆ timedWait()
bool timedWait |
( |
Duration const & |
relTime | ) |
const |
|
inlineinherited |
Waits and blocks the current thread until the result of the associated RPC call is ready, or the time duration specified by waitDuration has elapsed.
This is an interruption point.
- Returns
- false if the call is returning because the time specified was reached, true otherwise.
◆ timedWaitUntil()
bool timedWaitUntil |
( |
boost::system_time const & |
absTime | ) |
const |
|
inlineinherited |
Waits and blocks the current thread until the result of the associated RPC call is ready, or the time point specified by waitDuration has passed.
This is an interruption point.
- Returns
- false if the call is returning because the time specified was reached, true otherwise.
◆ swap()
Swaps ownership of the asynchronous results associated with other and *this.
◆ mClient
◆ mCallId
◆ mFuture
boost::unique_future<void > mFuture |
|
protectedinherited |
The documentation for this class was generated from the following file: