xrpld
Loading...
Searching...
No Matches
xrpl::rpc::BookChangesHandler Class Reference

Handles the book_changes RPC method. More...

#include <BookChanges.h>

Inheritance diagram for xrpl::rpc::BookChangesHandler:
Collaboration diagram for xrpl::rpc::BookChangesHandler:

Classes

struct  Output
 The data a book_changes request produces, written out by writeResult(). More...

Public Member Functions

 BookChangesHandler (JsonContext &context)
 Construct a handler for a single request.
std::expected< Output, ::rpc::Status > process (Input const &input) const
 Process the request.

Static Public Member Functions

static void writeResult (json::Value &value, Output const &output)
 Write the output of process() into the response.

Private Attributes

std::reference_wrapper< JsonContext > context_

Detailed Description

Handles the book_changes RPC method.

The request is parsed by ::rpc::spec::handlers::book_changes.

Definition at line 23 of file handlers/orderbook/BookChanges.h.

Constructor & Destructor Documentation

◆ BookChangesHandler()

xrpl::rpc::BookChangesHandler::BookChangesHandler ( JsonContext & context)
explicit

Construct a handler for a single request.

Parameters
contextThe context of the request being handled.

Definition at line 16 of file BookChanges.cpp.

Member Function Documentation

◆ process()

std::expected< BookChangesHandler::Output,::rpc::Status > xrpl::rpc::BookChangesHandler::process ( Input const & input) const
nodiscard

Process the request.

Parameters
inputThe request, parsed and validated by the spec.
Returns
The output to write, or the status of the error.

Definition at line 21 of file BookChanges.cpp.

◆ writeResult()

void xrpl::rpc::BookChangesHandler::writeResult ( json::Value & value,
Output const & output )
static

Write the output of process() into the response.

Parameters
valueThe response to write into.
outputThe output process() returned.

Definition at line 32 of file BookChanges.cpp.

Member Data Documentation

◆ context_

std::reference_wrapper<JsonContext> xrpl::rpc::BookChangesHandler::context_
private

Definition at line 60 of file handlers/orderbook/BookChanges.h.