SObjectizer
5.5
|
A special proxy for service request invocation. More...
#include <mbox.hpp>
Public Member Functions | |
service_invoke_proxy_t (const mbox_t &mbox) | |
service_invoke_proxy_t (mbox_t &&mbox) | |
template<class Param > | |
std::future< Result > | async () const |
Make asynchronous service request. More... | |
template<class Request_Type , class Envelope_Type > | |
std::future< Result > | async_2 (intrusive_ptr_t< Envelope_Type > msg_ref) const |
Make service request call with param. More... | |
template<class Request_Type > | |
std::future< Result > | async (intrusive_ptr_t< Request_Type > msg_ref) const |
Make service request call with param. More... | |
template<class Param > | |
std::future< Result > | async (std::unique_ptr< Param > msg_unique_ptr) const |
Make service request call with param. More... | |
template<class Param > | |
std::future< Result > | async (Param *msg) const |
Make service request call with param. More... | |
infinite_wait_service_invoke_proxy_t< Result > | wait_forever () const |
infinite_wait_service_invoke_proxy_t< Result > | get_wait_proxy (infinite_wait_indication) const |
A helper method for create a proxy for infinite waiting on service request. More... | |
template<class Duration > | |
wait_for_service_invoke_proxy_t< Result, Duration > | wait_for (const Duration &timeout) const |
template<class Duration > | |
wait_for_service_invoke_proxy_t< Result, Duration > | get_wait_proxy (const Duration &timeout) const |
A helper method to create a proxy for waiting on service request for a timeout. More... | |
template<class Param , typename... Args> | |
std::future< Result > | make_async (Args &&... args) const |
Create param and make service request call. More... | |
Private Attributes | |
mbox_t | m_mbox |
A special proxy for service request invocation.
|
explicit |
|
explicit |
std::future< Result > so_5::service_invoke_proxy_t< Result >::async | ( | ) | const |
Make asynchronous service request.
This method should be used for the cases where Param is a signal.
Param | type of signal to be sent to distination. |
std::future< Result > so_5::service_invoke_proxy_t< Result >::async | ( | intrusive_ptr_t< Request_Type > | msg_ref | ) | const |
Make service request call with param.
This method should be used for the case where Param is a message.
Request_Type | type of message to be sent to distination. |
std::future< Result > so_5::service_invoke_proxy_t< Result >::async | ( | std::unique_ptr< Param > | msg_unique_ptr | ) | const |
Make service request call with param.
This method should be used for the case where Param is a message.
Param | type of message to be sent to distination. |
std::future< Result > so_5::service_invoke_proxy_t< Result >::async | ( | Param * | msg | ) | const |
Make service request call with param.
This method should be used for the case where Param is a message.
Param | type of message to be sent to distination. |
std::future< Result > so_5::service_invoke_proxy_t< Result >::async_2 | ( | intrusive_ptr_t< Envelope_Type > | msg_ref | ) | const |
Make service request call with param.
This method should be used for the case where Envelope_Type is a message.
Request_Type | type to which receiver must be subscribed. |
Envelope_Type | type of message object to be sent. |
|
inline |
A helper method for create a proxy for infinite waiting on service request.
|
inline |
A helper method to create a proxy for waiting on service request for a timeout.
timeout | Timeout for std::future::wait_for(). |
std::future< Result > so_5::service_invoke_proxy_t< Result >::make_async | ( | Args &&... | args | ) | const |
Create param and make service request call.
This method should be used for the case where Param is a message.
Param | type of message to be sent to distination. |
Args | types of Param's constructor arguments. |
wait_for_service_invoke_proxy_t< Result, Duration > so_5::service_invoke_proxy_t< Result >::wait_for | ( | const Duration & | timeout | ) | const |
Make another proxy for time-limited synchronous service requests calls.
This method is used as second part of method chain for synchronous interaction. It must be used if service request initiator want to wait response no more than specified amount of time.
The call to wait_for if equivalent of:
It means that return conditions for wait_for() are the same as return conditions for underlying call to std::future::wait_for().
timeout | Timeout for std::future::wait_for(). |
infinite_wait_service_invoke_proxy_t< Result > so_5::service_invoke_proxy_t< Result >::wait_forever | ( | ) | const |
Make another proxy for time-unlimited synchronous service request calls.
This method is used as second part of method chain for synchronous interaction. It must be used if service request initiator want to wait response of infinite amount of time.
The call to wait_forever if equivalent of:
It means that return conditions for wait_forever() are the same as return conditions for underlying call to std::future::get().
|
private |