CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ccf::RpcContext Class Referenceabstract

Describes the currently executing RPC. More...

#include <rpc_context.h>

Inherited by ccf::RpcContextImpl.

Public Member Functions

virtual ~RpcContext ()=default
 
virtual std::shared_ptr< SessionContextget_session_context () const =0
 
virtual void set_user_data (std::shared_ptr< void > data)=0
 
virtual void * get_user_data () const =0
 
virtual const std::vector< uint8_t > & get_request_body () const =0
 
virtual const std::string & get_request_query () const =0
 
virtual const ccf::RESTVerbget_request_verb () const =0
 
virtual std::string get_request_path () const =0
 
virtual std::string get_method () const =0
 
virtual std::shared_ptr< ccf::http::HTTPResponderget_responder () const =0
 
virtual const PathParamsget_request_path_params ()=0
 
virtual const PathParamsget_decoded_request_path_params ()=0
 
virtual const http::HeaderMapget_request_headers () const =0
 Returns map of all headers found in the request.
 
virtual std::optional< std::string > get_request_header (const std::string_view &name) const =0
 
virtual const std::string & get_request_url () const =0
 
virtual ccf::FrameFormat frame_format () const =0
 
virtual void set_response_body (const std::vector< uint8_t > &body)=0
 Sets the main body or payload of the response.
 
virtual void set_response_body (std::vector< uint8_t > &&body)=0
 Sets the main body or payload of the response.
 
virtual void set_response_body (std::string &&body)=0
 Sets the main body or payload of the response.
 
virtual const std::vector< uint8_t > & get_response_body () const =0
 
virtual void set_response_status (int status)=0
 Sets initial status code summarising result of RPC.
 
virtual int get_response_status () const =0
 
virtual void set_response_header (const std::string_view &name, const std::string_view &value)=0
 
virtual void set_response_header (const std::string_view &name, size_t n)
 
virtual void set_response_header (const http::HeaderKeyValue &kv)
 
virtual void clear_response_headers ()=0
 
virtual void set_response_trailer (const std::string_view &name, const std::string_view &value)=0
 
virtual void set_response_trailer (const std::string_view &name, size_t n)
 
virtual void set_response_trailer (const http::HeaderKeyValue &kv)
 
virtual void set_response_json (const nlohmann::json &body, http_status status)=0
 
virtual void set_error (http_status status, const std::string &code, std::string &&msg, const std::vector< nlohmann::json > &details={})=0
 Construct error response, formatted as JSON OData.
 
virtual void set_error (ccf::ErrorDetails &&error)=0
 Construct error response, formatted as JSON OData.
 
virtual void set_apply_writes (bool apply)=0
 
virtual void set_claims_digest (ccf::ClaimsDigest::Digest &&digest)=0
 

Detailed Description

Describes the currently executing RPC.

Constructor & Destructor Documentation

◆ ~RpcContext()

virtual ccf::RpcContext::~RpcContext ( )
virtualdefault

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