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>

Inheritance diagram for rpc::SubscribeHandler:
Collaboration diagram for rpc::SubscribeHandler:

Classes

struct  Output
 A struct to hold the output data of the command. More...

Public Types

using OrderBook = rpc::spec::handlers::subscribe::OrderBook
 A struct to hold the data for one order book.
using StreamType = rpc::spec::handlers::subscribe::StreamType
 A subscribable stream type.
using Result = HandlerReturnType<Output>

Public Member Functions

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

Friends

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

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 > sharedPtrBackend,
std::shared_ptr< data::AmendmentCenterInterface const > const & amendmentCenter,
std::shared_ptr< feed::SubscriptionManagerInterface > const & subscriptions )

Construct a new BaseSubscribeHandler object.

Parameters
sharedPtrBackendThe backend to use
amendmentCenterThe amendmentCenter to use
subscriptionsThe subscription manager to use

Member Function Documentation

◆ process()

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

Process the Subscribe command.

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

◆ tag_invoke

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

The documentation for this class was generated from the following files:
  • /__w/clio/clio/src/rpc/handlers/Subscribe.hpp
  • /__w/clio/clio/src/rpc/handlers/Subscribe.cpp