rippled
Classes | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
ripple::GRPCServerImpl Class Referencefinal
Collaboration diagram for ripple::GRPCServerImpl:
Collaboration graph
[legend]

Classes

class  CallData
 

Public Member Functions

 GRPCServerImpl (Application &app)
 
 GRPCServerImpl (const GRPCServerImpl &)=delete
 
GRPCServerImploperator= (const GRPCServerImpl &)=delete
 
void shutdown ()
 
bool start ()
 
void handleRpcs ()
 
std::vector< std::shared_ptr< Processor > > setupListeners ()
 

Private Types

template<class Request , class Response >
using BindListener = std::function< void(org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService &, grpc::ServerContext *, Request *, grpc::ServerAsyncResponseWriter< Response > *, grpc::CompletionQueue *, grpc::ServerCompletionQueue *, void *)>
 
template<class Request , class Response >
using Handler = std::function< std::pair< Response, grpc::Status >(RPC::GRPCContext< Request > &)>
 

Private Attributes

std::unique_ptr< grpc::ServerCompletionQueue > cq_
 
std::vector< std::shared_ptr< Processor > > requests_
 
org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService service_
 
std::unique_ptr< grpc::Server > server_
 
Applicationapp_
 
std::string serverAddress_
 
beast::Journal journal_
 

Static Private Attributes

static constexpr unsigned apiVersion = 1
 

Detailed Description

Definition at line 71 of file GRPCServer.h.

Member Typedef Documentation

◆ BindListener

template<class Request , class Response >
using ripple::GRPCServerImpl::BindListener = std::function<void( org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService&, grpc::ServerContext*, Request*, grpc::ServerAsyncResponseWriter<Response>*, grpc::CompletionQueue*, grpc::ServerCompletionQueue*, void*)>
private

Definition at line 102 of file GRPCServer.h.

◆ Handler

template<class Request , class Response >
using ripple::GRPCServerImpl::Handler = std::function<std::pair<Response, grpc::Status>( RPC::GRPCContext<Request>&)>
private

Definition at line 108 of file GRPCServer.h.

Constructor & Destructor Documentation

◆ GRPCServerImpl() [1/2]

ripple::GRPCServerImpl::GRPCServerImpl ( Application app)
explicit

Definition at line 207 of file GRPCServer.cpp.

◆ GRPCServerImpl() [2/2]

ripple::GRPCServerImpl::GRPCServerImpl ( const GRPCServerImpl )
delete

Member Function Documentation

◆ operator=()

GRPCServerImpl& ripple::GRPCServerImpl::operator= ( const GRPCServerImpl )
delete

◆ shutdown()

void ripple::GRPCServerImpl::shutdown ( )

Definition at line 237 of file GRPCServer.cpp.

◆ start()

bool ripple::GRPCServerImpl::start ( )

Definition at line 418 of file GRPCServer.cpp.

◆ handleRpcs()

void ripple::GRPCServerImpl::handleRpcs ( )

Definition at line 259 of file GRPCServer.cpp.

◆ setupListeners()

std::vector< std::shared_ptr< Processor > > ripple::GRPCServerImpl::setupListeners ( )

Definition at line 330 of file GRPCServer.cpp.

Member Data Documentation

◆ cq_

std::unique_ptr<grpc::ServerCompletionQueue> ripple::GRPCServerImpl::cq_
private

Definition at line 76 of file GRPCServer.h.

◆ requests_

std::vector<std::shared_ptr<Processor> > ripple::GRPCServerImpl::requests_
private

Definition at line 78 of file GRPCServer.h.

◆ service_

org::xrpl::rpc::v1::XRPLedgerAPIService::AsyncService ripple::GRPCServerImpl::service_
private

Definition at line 81 of file GRPCServer.h.

◆ server_

std::unique_ptr<grpc::Server> ripple::GRPCServerImpl::server_
private

Definition at line 83 of file GRPCServer.h.

◆ app_

Application& ripple::GRPCServerImpl::app_
private

Definition at line 85 of file GRPCServer.h.

◆ serverAddress_

std::string ripple::GRPCServerImpl::serverAddress_
private

Definition at line 87 of file GRPCServer.h.

◆ journal_

beast::Journal ripple::GRPCServerImpl::journal_
private

Definition at line 89 of file GRPCServer.h.

◆ apiVersion

constexpr unsigned ripple::GRPCServerImpl::apiVersion = 1
staticconstexprprivate

Definition at line 110 of file GRPCServer.h.