rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ripple::RPCSubImp Class Reference
Inheritance diagram for ripple::RPCSubImp:
Inheritance graph
[legend]
Collaboration diagram for ripple::RPCSubImp:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 RPCSubImp (InfoSub::Source &source, boost::asio::io_context &io_context, JobQueue &jobQueue, std::string const &strUrl, std::string const &strUsername, std::string const &strPassword, Logs &logs)
 
 ~RPCSubImp ()=default
 
void send (Json::Value const &jvObj, bool broadcast) override
 
void setUsername (std::string const &strUsername) override
 
void setPassword (std::string const &strPassword) override
 
ConsumergetConsumer ()
 
std::uint64_t getSeq ()
 
void onSendEmpty ()
 
void insertSubAccountInfo (AccountID const &account, bool rt)
 
void deleteSubAccountInfo (AccountID const &account, bool rt)
 
bool insertSubAccountHistory (AccountID const &account)
 
void deleteSubAccountHistory (AccountID const &account)
 
void clearRequest ()
 
void setRequest (std::shared_ptr< InfoSubRequest > const &req)
 
std::shared_ptr< InfoSubRequest > const & getRequest ()
 
void setApiVersion (unsigned int apiVersion)
 
unsigned int getApiVersion () const noexcept
 

Protected Attributes

std::mutex mLock
 

Private Member Functions

void sendThread ()
 

Static Private Member Functions

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

Private Attributes

boost::asio::io_context & m_io_context
 
JobQueuem_jobQueue
 
std::string mUrl
 
std::string mIp
 
std::uint16_t mPort
 
bool mSSL
 
std::string mUsername
 
std::string mPassword
 
std::string mPath
 
int mSeq
 
bool mSending
 
std::deque< std::pair< int, Json::Value > > mDeque
 
beast::Journal const j_
 
Logslogs_
 
Consumer m_consumer
 
Sourcem_source
 
hash_set< AccountIDrealTimeSubscriptions_
 
hash_set< AccountIDnormalSubscriptions_
 
std::shared_ptr< InfoSubRequestrequest_
 
hash_set< AccountIDaccountHistorySubscriptions_
 
unsigned int apiVersion_ = 0
 

Detailed Description

Definition at line 14 of file RPCSub.cpp.

Member Typedef Documentation

◆ pointer

Definition at line 35 of file InfoSub.h.

◆ wptr

Definition at line 39 of file InfoSub.h.

◆ ref

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

Definition at line 41 of file InfoSub.h.

◆ Consumer

Definition at line 43 of file InfoSub.h.

Constructor & Destructor Documentation

◆ RPCSubImp()

ripple::RPCSubImp::RPCSubImp ( InfoSub::Source source,
boost::asio::io_context &  io_context,
JobQueue jobQueue,
std::string const &  strUrl,
std::string const &  strUsername,
std::string const &  strPassword,
Logs logs 
)

Definition at line 17 of file RPCSub.cpp.

◆ ~RPCSubImp()

ripple::RPCSubImp::~RPCSubImp ( )
default

Member Function Documentation

◆ send()

void ripple::RPCSubImp::send ( Json::Value const &  jvObj,
bool  broadcast 
)
overridevirtual

Implements ripple::InfoSub.

Definition at line 60 of file RPCSub.cpp.

◆ setUsername()

void ripple::RPCSubImp::setUsername ( std::string const &  strUsername)
overridevirtual

Implements ripple::RPCSub.

Definition at line 82 of file RPCSub.cpp.

◆ setPassword()

void ripple::RPCSubImp::setPassword ( std::string const &  strPassword)
overridevirtual

Implements ripple::RPCSub.

Definition at line 90 of file RPCSub.cpp.

◆ sendThread()

void ripple::RPCSubImp::sendThread ( )
private

Definition at line 101 of file RPCSub.cpp.

◆ getConsumer()

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

Definition at line 49 of file InfoSub.cpp.

◆ getSeq()

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

Definition at line 55 of file InfoSub.cpp.

◆ onSendEmpty()

void ripple::InfoSub::onSendEmpty ( )
inherited

Definition at line 61 of file InfoSub.cpp.

◆ insertSubAccountInfo()

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

Definition at line 66 of file InfoSub.cpp.

◆ deleteSubAccountInfo()

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

Definition at line 77 of file InfoSub.cpp.

◆ insertSubAccountHistory()

bool ripple::InfoSub::insertSubAccountHistory ( AccountID const &  account)
inherited

Definition at line 88 of file InfoSub.cpp.

◆ deleteSubAccountHistory()

void ripple::InfoSub::deleteSubAccountHistory ( AccountID const &  account)
inherited

Definition at line 95 of file InfoSub.cpp.

◆ clearRequest()

void ripple::InfoSub::clearRequest ( )
inherited

Definition at line 102 of file InfoSub.cpp.

◆ setRequest()

void ripple::InfoSub::setRequest ( std::shared_ptr< InfoSubRequest > const &  req)
inherited

Definition at line 108 of file InfoSub.cpp.

◆ getRequest()

std::shared_ptr< InfoSubRequest > const & ripple::InfoSub::getRequest ( )
inherited

Definition at line 114 of file InfoSub.cpp.

◆ setApiVersion()

void ripple::InfoSub::setApiVersion ( unsigned int  apiVersion)
inherited

Definition at line 120 of file InfoSub.cpp.

◆ getApiVersion()

unsigned int ripple::InfoSub::getApiVersion ( ) const
noexceptinherited

Definition at line 126 of file InfoSub.cpp.

◆ assign_id()

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

Definition at line 233 of file InfoSub.h.

◆ getCounter()

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

Definition at line 110 of file CountedObject.h.

Member Data Documentation

◆ m_io_context

boost::asio::io_context& ripple::RPCSubImp::m_io_context
private

Definition at line 161 of file RPCSub.cpp.

◆ m_jobQueue

JobQueue& ripple::RPCSubImp::m_jobQueue
private

Definition at line 162 of file RPCSub.cpp.

◆ mUrl

std::string ripple::RPCSubImp::mUrl
private

Definition at line 164 of file RPCSub.cpp.

◆ mIp

std::string ripple::RPCSubImp::mIp
private

Definition at line 165 of file RPCSub.cpp.

◆ mPort

std::uint16_t ripple::RPCSubImp::mPort
private

Definition at line 166 of file RPCSub.cpp.

◆ mSSL

bool ripple::RPCSubImp::mSSL
private

Definition at line 167 of file RPCSub.cpp.

◆ mUsername

std::string ripple::RPCSubImp::mUsername
private

Definition at line 168 of file RPCSub.cpp.

◆ mPassword

std::string ripple::RPCSubImp::mPassword
private

Definition at line 169 of file RPCSub.cpp.

◆ mPath

std::string ripple::RPCSubImp::mPath
private

Definition at line 170 of file RPCSub.cpp.

◆ mSeq

int ripple::RPCSubImp::mSeq
private

Definition at line 172 of file RPCSub.cpp.

◆ mSending

bool ripple::RPCSubImp::mSending
private

Definition at line 174 of file RPCSub.cpp.

◆ mDeque

std::deque<std::pair<int, Json::Value> > ripple::RPCSubImp::mDeque
private

Definition at line 176 of file RPCSub.cpp.

◆ j_

beast::Journal const ripple::RPCSubImp::j_
private

Definition at line 178 of file RPCSub.cpp.

◆ logs_

Logs& ripple::RPCSubImp::logs_
private

Definition at line 179 of file RPCSub.cpp.

◆ mLock

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

Definition at line 220 of file InfoSub.h.

◆ m_consumer

Consumer ripple::InfoSub::m_consumer
privateinherited

Definition at line 223 of file InfoSub.h.

◆ m_source

Source& ripple::InfoSub::m_source
privateinherited

Definition at line 224 of file InfoSub.h.

◆ realTimeSubscriptions_

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

Definition at line 225 of file InfoSub.h.

◆ normalSubscriptions_

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

Definition at line 226 of file InfoSub.h.

◆ request_

std::shared_ptr<InfoSubRequest> ripple::InfoSub::request_
privateinherited

Definition at line 227 of file InfoSub.h.

◆ accountHistorySubscriptions_

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

Definition at line 229 of file InfoSub.h.

◆ apiVersion_

unsigned int ripple::InfoSub::apiVersion_ = 0
privateinherited

Definition at line 230 of file InfoSub.h.