Leosac  0.8.0
Open Source Access Control
Leosac::Tasks::RemoteControlAsyncResponse Class Reference

This task represent an asynchronous response that shall be sent over the Remote Control router socket. More...

#include <RemoteControlAsyncResponse.hpp>

+ Inheritance diagram for Leosac::Tasks::RemoteControlAsyncResponse:
+ Collaboration diagram for Leosac::Tasks::RemoteControlAsyncResponse:

Public Member Functions

 RemoteControlAsyncResponse (const std::string identity, const zmqpp::message_t &msg, zmqpp::socket_t &socket)
 
- Public Member Functions inherited from Leosac::Tasks::Task
 Task ()
 
virtual ~Task ()
 
 Task (const Task &)=delete
 
 Task (Task &&)=delete
 
Taskoperator= (const Task &)=delete
 
Taskoperator= (Task &&)=delete
 
bool is_complete () const
 Has the tasks completed its execution. More...
 
void wait ()
 Instead of spinlocking over is_complete() one can call wait() to hum... More...
 
void run ()
 
bool succeed () const
 
std::exception_ptr get_exception () const
 
template<typename Callback >
void set_on_completion (Callback c)
 Set a callback that will be invoked when the tasks is completed, no matter if it succeeded or not. More...
 
template<typename Callback >
void set_on_success (Callback c)
 Set a callback that will be invoked if and when the task succeed. More...
 
template<typename Callback >
void set_on_failure (Callback c)
 Set a callback that will be invoked if and when the task fails. More...
 
const std::string & get_guid () const
 

Private Member Functions

virtual bool do_run ()
 

Private Attributes

zmqpp::message_t msg_
 
zmqpp::socket_t & socket_
 

Detailed Description

This task represent an asynchronous response that shall be sent over the Remote Control router socket.

Definition at line 33 of file RemoteControlAsyncResponse.hpp.

Constructor & Destructor Documentation

◆ RemoteControlAsyncResponse()

RemoteControlAsyncResponse::RemoteControlAsyncResponse ( const std::string  identity,
const zmqpp::message_t &  msg,
zmqpp::socket_t &  socket 
)

Definition at line 31 of file RemoteControlAsyncResponse.cpp.

Member Function Documentation

◆ do_run()

bool RemoteControlAsyncResponse::do_run ( )
privatevirtual

Implements Leosac::Tasks::Task.

Definition at line 26 of file RemoteControlAsyncResponse.cpp.

Member Data Documentation

◆ msg_

zmqpp::message_t Leosac::Tasks::RemoteControlAsyncResponse::msg_
private

Definition at line 42 of file RemoteControlAsyncResponse.hpp.

◆ socket_

zmqpp::socket_t& Leosac::Tasks::RemoteControlAsyncResponse::socket_
private

Definition at line 43 of file RemoteControlAsyncResponse.hpp.


The documentation for this class was generated from the following files: