TARAXA
ServerInterface< I > Class Template Referenceabstract

#include <ModularServer.h>

Classes

struct  RPCModule
 

Public Types

using MethodPointer = AbstractMethodPointer< I >
 
using NotificationPointer = AbstractNotificationPointer< I >
 
using MethodBinding = std::tuple< jsonrpc::Procedure, AbstractMethodPointer< I > >
 
using NotificationBinding = std::tuple< jsonrpc::Procedure, AbstractNotificationPointer< I > >
 
using Methods = std::vector< MethodBinding >
 
using Notifications = std::vector< NotificationBinding >
 
using RPCModules = std::vector< RPCModule >
 

Public Member Functions

virtual ~ServerInterface ()
 
Methods const & methods () const
 
Notifications const & notifications () const
 
virtual RPCModules implementedModules () const =0
 

Protected Member Functions

void bindAndAddMethod (jsonrpc::Procedure const &_proc, MethodPointer _pointer)
 
void bindAndAddNotification (jsonrpc::Procedure const &_proc, NotificationPointer _pointer)
 

Private Attributes

Methods m_methods
 
Notifications m_notifications
 

Class Documentation

◆ ServerInterface::RPCModule

struct ServerInterface::RPCModule

template<class I>
struct ServerInterface< I >::RPCModule

Collaboration diagram for ServerInterface< I >::RPCModule:
Class Members
string name
string version

Member Typedef Documentation

◆ MethodBinding

template<class I >
using ServerInterface< I >::MethodBinding = std::tuple<jsonrpc::Procedure, AbstractMethodPointer<I> >

◆ MethodPointer

template<class I >
using ServerInterface< I >::MethodPointer = AbstractMethodPointer<I>

◆ Methods

template<class I >
using ServerInterface< I >::Methods = std::vector<MethodBinding>

◆ NotificationBinding

template<class I >
using ServerInterface< I >::NotificationBinding = std::tuple<jsonrpc::Procedure, AbstractNotificationPointer<I> >

◆ NotificationPointer

◆ Notifications

template<class I >
using ServerInterface< I >::Notifications = std::vector<NotificationBinding>

◆ RPCModules

template<class I >
using ServerInterface< I >::RPCModules = std::vector<RPCModule>

Constructor & Destructor Documentation

◆ ~ServerInterface()

template<class I >
virtual ServerInterface< I >::~ServerInterface ( )
inlinevirtual

Member Function Documentation

◆ bindAndAddMethod()

template<class I >
void ServerInterface< I >::bindAndAddMethod ( jsonrpc::Procedure const &  _proc,
MethodPointer  _pointer 
)
inlineprotected

◆ bindAndAddNotification()

template<class I >
void ServerInterface< I >::bindAndAddNotification ( jsonrpc::Procedure const &  _proc,
NotificationPointer  _pointer 
)
inlineprotected

◆ implementedModules()

template<class I >
virtual RPCModules ServerInterface< I >::implementedModules ( ) const
pure virtual
Returns
which interfaces (eth, admin, db, ...) this class implements in which version.

Implemented in taraxa::net::Test, taraxa::net::Taraxa, taraxa::net::Net, taraxa::net::rpc::eth::EthImpl, and taraxa::net::Debug.

◆ methods()

template<class I >
Methods const& ServerInterface< I >::methods ( ) const
inline

◆ notifications()

template<class I >
Notifications const& ServerInterface< I >::notifications ( ) const
inline

Member Data Documentation

◆ m_methods

template<class I >
Methods ServerInterface< I >::m_methods
private

◆ m_notifications

template<class I >
Notifications ServerInterface< I >::m_notifications
private

The documentation for this class was generated from the following file: