Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
system_jrpc_processor.cpp
Go to the documentation of this file.
1
6
#include "
api/service/system/system_jrpc_processor.hpp
"
7
8
#include "
api/jrpc/jrpc_method.hpp
"
9
#include "
api/service/system/requests/account_next_index.hpp
"
10
#include "
api/service/system/requests/chain.hpp
"
11
#include "
api/service/system/requests/chain_type.hpp
"
12
#include "
api/service/system/requests/health.hpp
"
13
#include "
api/service/system/requests/name.hpp
"
14
#include "
api/service/system/requests/peers.hpp
"
15
#include "
api/service/system/requests/properties.hpp
"
16
#include "
api/service/system/requests/version.hpp
"
17
18
namespace
kagome::api::system
{
19
20
SystemJrpcProcessor::SystemJrpcProcessor
(std::shared_ptr<JRpcServer> server,
21
std::shared_ptr<SystemApi> api)
22
: api_{std::move(api)},
server_
{std::move(server)} {
23
BOOST_ASSERT(
api_
!=
nullptr
);
24
BOOST_ASSERT(
server_
!=
nullptr
);
25
}
26
27
template
<
typename
Request>
28
using
Handler
=
kagome::api::Method<Request, SystemApi>
;
29
30
void
SystemJrpcProcessor::registerHandlers
() {
31
server_
->registerHandler(
"system_chain"
,
Handler<request::Chain>
(
api_
));
32
33
server_
->registerHandler(
"system_chainType"
,
34
Handler<request::ChainType>
(
api_
));
35
36
server_
->registerHandler(
"system_health"
,
Handler<request::Health>
(
api_
));
37
38
server_
->registerHandler(
"system_name"
,
Handler<request::Name>
(
api_
));
39
40
server_
->registerHandler(
"system_properties"
,
41
Handler<request::Properties>
(
api_
));
42
43
server_
->registerHandler(
"system_version"
,
Handler<request::Version>
(
api_
));
44
45
server_
->registerHandler(
"system_accountNextIndex"
,
46
Handler<request::AccountNextIndex>
(
api_
));
47
server_
->registerHandler(
48
"account_nextIndex"
,
49
Handler<request::AccountNextIndex>
(
api_
));
// an alias
50
51
server_
->registerHandler(
"system_peers"
,
Handler<request::Peers>
(
api_
));
52
}
53
54
}
// namespace kagome::api::system
kagome::api::system::SystemJrpcProcessor::registerHandlers
void registerHandlers() override
registers callbacks for jrpc request
Definition:
system_jrpc_processor.cpp:30
kagome::api::system::SystemJrpcProcessor::server_
std::shared_ptr< JRpcServer > server_
Definition:
system_jrpc_processor.hpp:26
chain.hpp
kagome::api::system::SystemJrpcProcessor::api_
std::shared_ptr< SystemApi > api_
Definition:
system_jrpc_processor.hpp:25
properties.hpp
kagome::api::system::SystemJrpcProcessor::SystemJrpcProcessor
SystemJrpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< SystemApi > api)
Definition:
system_jrpc_processor.cpp:20
health.hpp
system_jrpc_processor.hpp
kagome::api::system
kagome::api::Method
Definition:
jrpc_method.hpp:20
account_next_index.hpp
version.hpp
jrpc_method.hpp
name.hpp
chain_type.hpp
peers.hpp
core
api
service
system
system_jrpc_processor.cpp
Generated by
1.8.11