Kagome
Polkadot Runtime Engine in C++17
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
rpc_jrpc_processor.cpp
Go to the documentation of this file.
1
6
#include "
api/service/rpc/rpc_jrpc_processor.hpp
"
7
8
#include "
api/jrpc/jrpc_method.hpp
"
9
#include "
api/service/rpc/requests/methods.hpp
"
10
11
namespace
kagome::api::rpc
{
12
13
RpcJRpcProcessor::RpcJRpcProcessor
(std::shared_ptr<JRpcServer> server,
14
std::shared_ptr<RpcApi> api)
15
: api_{std::move(api)},
server_
{std::move(server)} {
16
BOOST_ASSERT(
api_
!=
nullptr
);
17
BOOST_ASSERT(
server_
!=
nullptr
);
18
}
19
20
template
<
typename
Request>
21
using
Handler
=
kagome::api::Method<Request, RpcApi>
;
22
23
void
RpcJRpcProcessor::registerHandlers
() {
24
server_
->registerHandler(
"rpc_methods"
,
Handler<request::Methods>
(
api_
));
25
}
26
27
}
// namespace kagome::api::rpc
kagome::api::rpc::RpcJRpcProcessor::RpcJRpcProcessor
RpcJRpcProcessor(std::shared_ptr< JRpcServer > server, std::shared_ptr< RpcApi > api)
Definition:
rpc_jrpc_processor.cpp:13
rpc_jrpc_processor.hpp
kagome::api::rpc::RpcJRpcProcessor::api_
std::shared_ptr< RpcApi > api_
Definition:
rpc_jrpc_processor.hpp:25
kagome::api::rpc
kagome::api::rpc::RpcJRpcProcessor::server_
std::shared_ptr< JRpcServer > server_
Definition:
rpc_jrpc_processor.hpp:26
kagome::api::Method
Definition:
jrpc_method.hpp:20
methods.hpp
kagome::api::rpc::RpcJRpcProcessor::registerHandlers
void registerHandlers() override
registers callbacks for jrpc request
Definition:
rpc_jrpc_processor.cpp:23
jrpc_method.hpp
core
api
service
rpc
rpc_jrpc_processor.cpp
Generated by
1.8.11