Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
rpc::SubscribeHandler Class Reference

Contains functionality for handling the subscribe command. The subscribe method requests periodic notifications from the server when certain events happen. More...

#include <Subscribe.hpp>

Classes

struct  Input
 A struct to hold the input data for the command. More...
 
struct  OrderBook
 A struct to hold the data for one order book. More...
 
struct  Output
 A struct to hold the output data of the command. More...
 

Public Types

using Result = HandlerReturnType<Output>
 

Public Member Functions

 SubscribeHandler (std::shared_ptr< BackendInterface > const &sharedPtrBackend, std::shared_ptr< feed::SubscriptionManagerInterface > const &subscriptions)
 Construct a new BaseSubscribeHandler object.
 
Result process (Input input, Context const &ctx) const
 Process the Subscribe command.
 

Static Public Member Functions

static RpcSpecConstRef spec (uint32_t apiVersion)
 Returns the API specification for the command.
 

Friends

void tag_invoke (boost::json::value_from_tag, boost::json::value &jv, SubscribeHandler::Output const &output)
 Convert output to json value.
 
Input tag_invoke (boost::json::value_to_tag< Input >, boost::json::value const &jv)
 Convert json value to input.
 

Detailed Description

Contains functionality for handling the subscribe command. The subscribe method requests periodic notifications from the server when certain events happen.

For more details see: https://xrpl.org/subscribe.html

Constructor & Destructor Documentation

◆ SubscribeHandler()

rpc::SubscribeHandler::SubscribeHandler ( std::shared_ptr< BackendInterface > const & sharedPtrBackend,
std::shared_ptr< feed::SubscriptionManagerInterface > const & subscriptions )

Construct a new BaseSubscribeHandler object.

Parameters
sharedPtrBackendThe backend to use
subscriptionsThe subscription manager to use

Member Function Documentation

◆ process()

SubscribeHandler::Result rpc::SubscribeHandler::process ( Input input,
Context const & ctx ) const

Process the Subscribe command.

Parameters
inputThe input data for the command
ctxThe context of the request
Returns
The result of the operation

◆ spec()

RpcSpecConstRef rpc::SubscribeHandler::spec ( uint32_t apiVersion)
static

Returns the API specification for the command.

Parameters
apiVersionThe api version to return the spec for
Returns
The spec for the given apiVersion

Friends And Related Symbol Documentation

◆ tag_invoke [1/2]

void tag_invoke ( boost::json::value_from_tag ,
boost::json::value & jv,
SubscribeHandler::Output const & output )
friend

Convert output to json value.

Parameters
jvThe json value to convert to
outputThe output to convert from

◆ tag_invoke [2/2]

Input tag_invoke ( boost::json::value_to_tag< Input > ,
boost::json::value const & jv )
friend

Convert json value to input.

Parameters
jvThe json value to convert from
Returns
The input to convert to

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