Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
HandlerProvider.hpp
1#pragma once
2
3#include "rpc/common/AnyHandler.hpp"
4
5#include <optional>
6#include <string>
7
8namespace rpc {
9
14public:
15 virtual ~HandlerProvider() = default;
16
23 virtual bool
24 contains(std::string const& command) const = 0;
25
32 virtual std::optional<AnyHandler>
33 getHandler(std::string const& command) const = 0;
34
41 virtual bool
42 isClioOnly(std::string const& command) const = 0;
43};
44
45} // namespace rpc
Interface for the provider of RPC handlers.
Definition HandlerProvider.hpp:13
virtual bool isClioOnly(std::string const &command) const =0
Check if a given method is Clio-only.
virtual bool contains(std::string const &command) const =0
Check if the provider contains a handler for a given method.
virtual std::optional< AnyHandler > getHandler(std::string const &command) const =0
Get the handler for a given method.
This namespace contains all the RPC logic and handlers.
Definition AMMHelpers.cpp:18