rippled
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Member Functions | Private Attributes | List of all members
ripple::RPCSub Class Referenceabstract

Subscription object for JSON RPC. More...

Inheritance diagram for ripple::RPCSub:
Inheritance graph
[legend]
Collaboration diagram for ripple::RPCSub:
Collaboration graph
[legend]

Public Types

using pointer = std::shared_ptr< InfoSub >
 
using wptr = std::weak_ptr< InfoSub >
 
using ref = const std::shared_ptr< InfoSub > &
 
using Consumer = Resource::Consumer
 

Public Member Functions

virtual void setUsername (std::string const &strUsername)=0
 
virtual void setPassword (std::string const &strPassword)=0
 
ConsumergetConsumer ()
 
virtual void send (Json::Value const &jvObj, bool broadcast)=0
 
std::uint64_t getSeq ()
 
void onSendEmpty ()
 
void insertSubAccountInfo (AccountID const &account, bool rt)
 
void deleteSubAccountInfo (AccountID const &account, bool rt)
 
void clearPathRequest ()
 
void setPathRequest (const std::shared_ptr< PathRequest > &req)
 
std::shared_ptr< PathRequest > const & getPathRequest ()
 

Protected Member Functions

 RPCSub (InfoSub::Source &source)
 

Protected Attributes

std::mutex mLock
 

Static Private Member Functions

static int assign_id ()
 
static auto & getCounter () noexcept
 

Private Attributes

Consumer m_consumer
 
Sourcem_source
 
hash_set< AccountIDrealTimeSubscriptions_
 
hash_set< AccountIDnormalSubscriptions_
 
std::shared_ptr< PathRequestmPathRequest
 
std::uint64_t mSeq
 

Detailed Description

Subscription object for JSON RPC.

Definition at line 31 of file RPCSub.h.

Member Typedef Documentation

◆ pointer

Definition at line 43 of file InfoSub.h.

◆ wptr

Definition at line 47 of file InfoSub.h.

◆ ref

using ripple::InfoSub::ref = const std::shared_ptr<InfoSub>&
inherited

Definition at line 49 of file InfoSub.h.

◆ Consumer

Definition at line 51 of file InfoSub.h.

Constructor & Destructor Documentation

◆ RPCSub()

ripple::RPCSub::RPCSub ( InfoSub::Source source)
explicitprotected

Definition at line 208 of file RPCSub.cpp.

Member Function Documentation

◆ setUsername()

virtual void ripple::RPCSub::setUsername ( std::string const &  strUsername)
pure virtual

Implemented in ripple::RPCSubImp.

◆ setPassword()

virtual void ripple::RPCSub::setPassword ( std::string const &  strPassword)
pure virtual

Implemented in ripple::RPCSubImp.

◆ getConsumer()

Resource::Consumer & ripple::InfoSub::getConsumer ( )
inherited

Definition at line 75 of file InfoSub.cpp.

◆ send()

virtual void ripple::InfoSub::send ( Json::Value const &  jvObj,
bool  broadcast 
)
pure virtualinherited

Implemented in ripple::RPCSubImp, and ripple::WSInfoSub.

◆ getSeq()

std::uint64_t ripple::InfoSub::getSeq ( )
inherited

Definition at line 81 of file InfoSub.cpp.

◆ onSendEmpty()

void ripple::InfoSub::onSendEmpty ( )
inherited

Definition at line 87 of file InfoSub.cpp.

◆ insertSubAccountInfo()

void ripple::InfoSub::insertSubAccountInfo ( AccountID const &  account,
bool  rt 
)
inherited

Definition at line 92 of file InfoSub.cpp.

◆ deleteSubAccountInfo()

void ripple::InfoSub::deleteSubAccountInfo ( AccountID const &  account,
bool  rt 
)
inherited

Definition at line 103 of file InfoSub.cpp.

◆ clearPathRequest()

void ripple::InfoSub::clearPathRequest ( )
inherited

Definition at line 114 of file InfoSub.cpp.

◆ setPathRequest()

void ripple::InfoSub::setPathRequest ( const std::shared_ptr< PathRequest > &  req)
inherited

Definition at line 120 of file InfoSub.cpp.

◆ getPathRequest()

const std::shared_ptr< PathRequest > & ripple::InfoSub::getPathRequest ( )
inherited

Definition at line 126 of file InfoSub.cpp.

◆ assign_id()

static int ripple::InfoSub::assign_id ( )
staticprivateinherited

Definition at line 194 of file InfoSub.h.

◆ getCounter()

static auto& ripple::CountedObject< InfoSub >::getCounter ( )
staticprivatenoexceptinherited

Definition at line 128 of file CountedObject.h.

Member Data Documentation

◆ mLock

std::mutex ripple::InfoSub::mLock
protectedinherited

Definition at line 183 of file InfoSub.h.

◆ m_consumer

Consumer ripple::InfoSub::m_consumer
privateinherited

Definition at line 186 of file InfoSub.h.

◆ m_source

Source& ripple::InfoSub::m_source
privateinherited

Definition at line 187 of file InfoSub.h.

◆ realTimeSubscriptions_

hash_set<AccountID> ripple::InfoSub::realTimeSubscriptions_
privateinherited

Definition at line 188 of file InfoSub.h.

◆ normalSubscriptions_

hash_set<AccountID> ripple::InfoSub::normalSubscriptions_
privateinherited

Definition at line 189 of file InfoSub.h.

◆ mPathRequest

std::shared_ptr<PathRequest> ripple::InfoSub::mPathRequest
privateinherited

Definition at line 190 of file InfoSub.h.

◆ mSeq

std::uint64_t ripple::InfoSub::mSeq
privateinherited

Definition at line 191 of file InfoSub.h.