ifw
0.0.1-dev
|
#include <SMRequestorRaw.hpp>
Public Member Functions | |
SMRequestorRaw (const std::string &endpoint, const std::string &identity, boost::asio::io_service &ios, rad::Dispatcher &dispatcher, UniqueEvent &&okEvent, UniqueEvent &&errEvent, UniqueEvent &&timeoutEvent) | |
virtual | ~SMRequestorRaw () |
size_t | Send (const std::string &payloadType, const std::string &payload, const long timeout=0) |
void | ReplyHandler (const std::error_code &errCode, const std::string &msgTypeId, const void *pData, const size_t dataSize) |
const std::string & | GetReplyPayloadType () |
const std::string & | GetReplyPayload () |
SMRequestorRaw (const SMRequestorRaw &)=delete | |
SMRequestorRaw & | operator= (const SMRequestorRaw &)=delete |
SMRequestorRaw (const std::string &endpoint, const std::string &identity, boost::asio::io_service &ios, rad::Dispatcher &dispatcher, UniqueEvent &&okEvent, UniqueEvent &&errEvent, UniqueEvent &&timeoutEvent) | |
virtual | ~SMRequestorRaw () |
size_t | Send (const std::string &payloadType, const std::string &payload, const long timeout=0) |
void | ReplyHandler (const std::error_code &errCode, const std::string &msgTypeId, const void *pData, const size_t dataSize) |
const std::string & | GetReplyPayloadType () |
const std::string & | GetReplyPayload () |
SMRequestorRaw (const SMRequestorRaw &)=delete | |
SMRequestorRaw & | operator= (const SMRequestorRaw &)=delete |
SMRequestorRaw (const std::string &endpoint, const std::string &identity, boost::asio::io_service &ios, rad::Dispatcher &dispatcher, UniqueEvent &&okEvent, UniqueEvent &&errEvent, UniqueEvent &&timeoutEvent) | |
virtual | ~SMRequestorRaw () |
size_t | Send (const std::string &payloadType, const std::string &payload, const long timeout=0) |
void | ReplyHandler (const std::error_code &errCode, const std::string &msgTypeId, const void *pData, const size_t dataSize) |
const std::string & | GetReplyPayloadType () |
const std::string & | GetReplyPayload () |
SMRequestorRaw (const SMRequestorRaw &)=delete | |
SMRequestorRaw & | operator= (const SMRequestorRaw &)=delete |
This class allows to send a request and receive a reply asynchronously. Upon reception of the reply an event OK or ERR event is injected in the SM engine.
rad::SMRequestorRaw::SMRequestorRaw | ( | const std::string & | endpoint, |
const std::string & | identity, | ||
boost::asio::io_service & | ios, | ||
rad::Dispatcher & | dispatcher, | ||
UniqueEvent && | okEvent, | ||
UniqueEvent && | errEvent, | ||
UniqueEvent && | timeoutEvent | ||
) |
|
virtual |
|
delete |
rad::SMRequestorRaw::SMRequestorRaw | ( | const std::string & | endpoint, |
const std::string & | identity, | ||
boost::asio::io_service & | ios, | ||
rad::Dispatcher & | dispatcher, | ||
UniqueEvent && | okEvent, | ||
UniqueEvent && | errEvent, | ||
UniqueEvent && | timeoutEvent | ||
) |
|
virtual |
|
delete |
rad::SMRequestorRaw::SMRequestorRaw | ( | const std::string & | endpoint, |
const std::string & | identity, | ||
boost::asio::io_service & | ios, | ||
rad::Dispatcher & | dispatcher, | ||
UniqueEvent && | okEvent, | ||
UniqueEvent && | errEvent, | ||
UniqueEvent && | timeoutEvent | ||
) |
|
virtual |
|
delete |
const std::string & rad::SMRequestorRaw::GetReplyPayload | ( | ) |
const std::string& rad::SMRequestorRaw::GetReplyPayload | ( | ) |
const std::string& rad::SMRequestorRaw::GetReplyPayload | ( | ) |
const std::string & rad::SMRequestorRaw::GetReplyPayloadType | ( | ) |
const std::string& rad::SMRequestorRaw::GetReplyPayloadType | ( | ) |
const std::string& rad::SMRequestorRaw::GetReplyPayloadType | ( | ) |
|
delete |
|
delete |
|
delete |
void rad::SMRequestorRaw::ReplyHandler | ( | const std::error_code & | errCode, |
const std::string & | msgTypeId, | ||
const void * | pData, | ||
const size_t | dataSize | ||
) |
void rad::SMRequestorRaw::ReplyHandler | ( | const std::error_code & | errCode, |
const std::string & | msgTypeId, | ||
const void * | pData, | ||
const size_t | dataSize | ||
) |
void rad::SMRequestorRaw::ReplyHandler | ( | const std::error_code & | errCode, |
const std::string & | msgTypeId, | ||
const void * | pData, | ||
const size_t | dataSize | ||
) |
Handle a reply to a raw request.
[in] | identity | Identity of the replier. |
[in] | msgTypeId | Type of the reply's payload. |
[in] | pData | Pointer to the reply's payload. |
[in] | dataSize | Size in bytes of the reply's payload. |
size_t rad::SMRequestorRaw::Send | ( | const std::string & | payloadType, |
const std::string & | payload, | ||
const long | timeout = 0 |
||
) |
Send a raw request to an endpoint.
[in] | endpoint | Where to send the request to. |
[in] | identity | Identity of the sender. |
[in] | payloadType | Type of the payload to send. |
[in] | payload | Payload to send. |
size_t rad::SMRequestorRaw::Send | ( | const std::string & | payloadType, |
const std::string & | payload, | ||
const long | timeout = 0 |
||
) |
size_t rad::SMRequestorRaw::Send | ( | const std::string & | payloadType, |
const std::string & | payload, | ||
const long | timeout = 0 |
||
) |