RTC Toolkit 5.1.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rtctk::rtcSupervisor::detail::WriteBackContext Class Reference

Holds context necessary for processing a WriteBack request to completion. More...

#include <rtctk/rtcSupervisor/supervisory.hpp>

Public Member Functions

 WriteBackContext (const rad::cii::Request< std::string, std::string > &request)
 Construct context with provided request.
 
 WriteBackContext (WriteBackContext &&) noexcept=default
 
const JsonPayloadGetArg () const noexcept
 
void SendReply () noexcept
 Sends hardcoded string reply.
 
void SendErrorReply (std::exception_ptr eptr) noexcept
 Send exceptional reply.
 
void SendStopReply () noexcept
 Send stop reply.
 

Detailed Description

Holds context necessary for processing a WriteBack request to completion.

It is meant to encapsulate the life time of a request and provides methods to send result or exceptional replies.

See also
rtctk::rtcSupervisor::Supervisory

Constructor & Destructor Documentation

◆ WriteBackContext() [1/2]

rtctk::rtcSupervisor::detail::WriteBackContext::WriteBackContext ( const rad::cii::Request< std::string, std::string > & request)
inlineexplicit

Construct context with provided request.

Parameters
requestcontaining JSON encoded string with arguments.
Exceptions
JsonPayload::parse_errorif parsing fails.

◆ WriteBackContext() [2/2]

rtctk::rtcSupervisor::detail::WriteBackContext::WriteBackContext ( WriteBackContext && )
defaultnoexcept

Member Function Documentation

◆ GetArg()

const JsonPayload & rtctk::rtcSupervisor::detail::WriteBackContext::GetArg ( ) const
inlinenoexcept
Returns
Deserialized argument from request.

◆ SendErrorReply()

void rtctk::rtcSupervisor::detail::WriteBackContext::SendErrorReply ( std::exception_ptr eptr)
inlinenoexcept

Send exceptional reply.

Parameters
eptrException to send.

◆ SendReply()

void rtctk::rtcSupervisor::detail::WriteBackContext::SendReply ( )
inlinenoexcept

Sends hardcoded string reply.

◆ SendStopReply()

void rtctk::rtcSupervisor::detail::WriteBackContext::SendStopReply ( )
inlinenoexcept

Send stop reply.


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