Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Dash RPC command dispatcher. More...
#include <server.h>
Public Member Functions | |
CRPCTable () | |
const CRPCCommand * | operator[] (const std::string &name) const |
std::string | help (const std::string &name, const std::string &strSubCommand, const JSONRPCRequest &helpreq) const |
Note: This interface may still be subject to change. More... | |
UniValue | execute (const JSONRPCRequest &request) const |
Execute a method. More... | |
std::vector< std::string > | listCommands () const |
Returns a list of registered commands. More... | |
bool | appendCommand (const std::string &name, const CRPCCommand *pcmd) |
Appends a CRPCCommand to the dispatch table. More... | |
Private Attributes | |
std::map< std::string, const CRPCCommand * > | mapCommands |
Detailed Description
Constructor & Destructor Documentation
◆ CRPCTable()
CRPCTable::CRPCTable | ( | ) |
Definition at line 333 of file server.cpp.
References mapCommands, CRPCCommand::name, and vRPCCommands.
Member Function Documentation
◆ appendCommand()
bool CRPCTable::appendCommand | ( | const std::string & | name, |
const CRPCCommand * | pcmd | ||
) |
Appends a CRPCCommand to the dispatch table.
Returns false if RPC server is already running (dump concurrency protection). Commands cannot be overwritten (returns false).
Definition at line 353 of file server.cpp.
References IsRPCRunning(), mapCommands, and name.
Referenced by RegisterBlockchainRPCCommands(), RegisterEvoRPCCommands(), RegisterGovernanceRPCCommands(), RegisterMasternodeRPCCommands(), RegisterMiningRPCCommands(), RegisterMiscRPCCommands(), RegisterNetRPCCommands(), RegisterPrivateSendRPCCommands(), RegisterQuorumsRPCCommands(), RegisterRawTransactionRPCCommands(), and RegisterWalletRPCCommands().
◆ execute()
UniValue CRPCTable::execute | ( | const JSONRPCRequest & | request | ) | const |
Execute a method.
- Parameters
-
request The JSONRPCRequest to execute
- Returns
- Result of the call.
- Exceptions
-
an exception (UniValue) when an error happens.
Definition at line 536 of file server.cpp.
References CRPCCommand::actor, CRPCCommand::argNames, cs_rpcWarmup, fRPCInWarmup, g_rpcSignals, UniValue::isObject(), JSONRPCError(), LOCK, JSONRPCRequest::params, CRPCSignals::PreCommand, RPC_IN_WARMUP, RPC_METHOD_NOT_FOUND, RPC_MISC_ERROR, rpcWarmupStatus(), JSONRPCRequest::strMethod, tableRPC, and transformNamedArguments().
Referenced by HTTPReq_JSONRPC(), JSONRPCExecOne(), and RPCConsole::RPCParseCommandLine().
◆ help()
std::string CRPCTable::help | ( | const std::string & | name, |
const std::string & | strSubCommand, | ||
const JSONRPCRequest & | helpreq | ||
) | const |
Note: This interface may still be subject to change.
Definition at line 203 of file server.cpp.
References CRPCCommand::actor, CRPCCommand::category, mapCommands, CRPCCommand::name, and strprintf.
Referenced by help().
◆ listCommands()
std::vector< std::string > CRPCTable::listCommands | ( | ) | const |
Returns a list of registered commands.
- Returns
- List of registered commands.
Definition at line 567 of file server.cpp.
References mapCommands.
Referenced by RPCConsole::setClientModel().
◆ operator[]()
const CRPCCommand * CRPCTable::operator[] | ( | const std::string & | name | ) | const |
Definition at line 345 of file server.cpp.
References mapCommands, and name.
Member Data Documentation
◆ mapCommands
|
private |
Definition at line 143 of file server.h.
Referenced by appendCommand(), CRPCTable(), help(), listCommands(), and operator[]().
The documentation for this class was generated from the following files:
- src/rpc/server.h
- src/rpc/server.cpp