rad 6.2.0
|
#include <request.hpp>
Public Member Functions | |
Request (const REQ_TYPE &req_payload) | |
Default copy constructor. | |
Request (const Request &)=default | |
Request (Request &&) noexcept(std::is_nothrow_move_constructible< REQ_TYPE >())=default | |
Default assignment operators. | |
Request & | operator= (const Request &)=default |
Request & | operator= (Request &&) noexcept(std::is_nothrow_move_assignable_v< REQ_TYPE >)=default |
const REQ_TYPE & | GetRequestPayload () const |
elt::mal::future< REP_TYPE > | GetReplyFuture () const |
std::shared_ptr< elt::mal::promise< REP_TYPE > > | GetReplyPromise () const |
void | SetReplyValue (const REP_TYPE &reply) const |
template<class T > | |
void | SetException (const T &e) const |
This class contains a copy of the payload of a MAL request and allows to send a MAL reply.
REP_TYPE | Type of the reply's payload. |
REQ_TYPE | Type of the request's payload (default is 'void'). |
|
inlineexplicit |
This constructor copies the payload associated to a MAL request and creates a promise for the MAL reply.
req_payload | Payload associated to the MAL request. |
REQ_TYPE | Type of the payload associated to the MAL request. |
|
default |
|
defaultnoexcept |
|
inline |
This method can be used to get the 'future' indicating when a reply is ready to be sent.
|
inline |
This method can be used to expose the promise that backs the 'future' indicating when a reply is ready to be sent.
In some scenario (see EICSSW-2560) the MAL reply promise is required to live beyond the life time of the Request object.
|
inline |
This method can be used to retrieve the payload associated to the received MAL request.
|
default |
|
defaultnoexcept |
|
inline |
This method allows to set an error reply.
T | Type of exception, which as a precondition from MAL must derive from elt::mal::MalException. |
e | Exception containing error description. |
|
inline |
This method allows to set the payload for the OK reply.
reply | Payload of the reply. |