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
xrpl::RPCSubImp Class Reference
Inheritance diagram for xrpl::RPCSubImp:
Inheritance graph
[legend]
Collaboration diagram for xrpl::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 33 of file InfoSub.h.

◆ wptr

Definition at line 37 of file InfoSub.h.

◆ ref

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

Definition at line 39 of file InfoSub.h.

◆ Consumer

Definition at line 41 of file InfoSub.h.

Constructor & Destructor Documentation

◆ RPCSubImp()

xrpl::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()

xrpl::RPCSubImp::~RPCSubImp ( )
default

Member Function Documentation

◆ send()

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

Implements xrpl::InfoSub.

Definition at line 58 of file RPCSub.cpp.

◆ setUsername()

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

Implements xrpl::RPCSub.

Definition at line 77 of file RPCSub.cpp.

◆ setPassword()

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

Implements xrpl::RPCSub.

Definition at line 85 of file RPCSub.cpp.

◆ sendThread()

void xrpl::RPCSubImp::sendThread ( )
private

Definition at line 96 of file RPCSub.cpp.

◆ getConsumer()

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

Definition at line 48 of file InfoSub.cpp.

◆ getSeq()

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

Definition at line 54 of file InfoSub.cpp.

◆ onSendEmpty()

void xrpl::InfoSub::onSendEmpty ( )
inherited

Definition at line 60 of file InfoSub.cpp.

◆ insertSubAccountInfo()

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

Definition at line 65 of file InfoSub.cpp.

◆ deleteSubAccountInfo()

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

Definition at line 76 of file InfoSub.cpp.

◆ insertSubAccountHistory()

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

Definition at line 87 of file InfoSub.cpp.

◆ deleteSubAccountHistory()

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

Definition at line 94 of file InfoSub.cpp.

◆ clearRequest()

void xrpl::InfoSub::clearRequest ( )
inherited

Definition at line 101 of file InfoSub.cpp.

◆ setRequest()

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

Definition at line 107 of file InfoSub.cpp.

◆ getRequest()

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

Definition at line 113 of file InfoSub.cpp.

◆ setApiVersion()

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

Definition at line 119 of file InfoSub.cpp.

◆ getApiVersion()

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

Definition at line 125 of file InfoSub.cpp.

◆ assign_id()

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

Definition at line 217 of file InfoSub.h.

◆ getCounter()

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

Definition at line 109 of file CountedObject.h.

Member Data Documentation

◆ m_io_context

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

Definition at line 145 of file RPCSub.cpp.

◆ m_jobQueue

JobQueue& xrpl::RPCSubImp::m_jobQueue
private

Definition at line 146 of file RPCSub.cpp.

◆ mUrl

std::string xrpl::RPCSubImp::mUrl
private

Definition at line 148 of file RPCSub.cpp.

◆ mIp

std::string xrpl::RPCSubImp::mIp
private

Definition at line 149 of file RPCSub.cpp.

◆ mPort

std::uint16_t xrpl::RPCSubImp::mPort
private

Definition at line 150 of file RPCSub.cpp.

◆ mSSL

bool xrpl::RPCSubImp::mSSL
private

Definition at line 151 of file RPCSub.cpp.

◆ mUsername

std::string xrpl::RPCSubImp::mUsername
private

Definition at line 152 of file RPCSub.cpp.

◆ mPassword

std::string xrpl::RPCSubImp::mPassword
private

Definition at line 153 of file RPCSub.cpp.

◆ mPath

std::string xrpl::RPCSubImp::mPath
private

Definition at line 154 of file RPCSub.cpp.

◆ mSeq

int xrpl::RPCSubImp::mSeq
private

Definition at line 156 of file RPCSub.cpp.

◆ mSending

bool xrpl::RPCSubImp::mSending
private

Definition at line 158 of file RPCSub.cpp.

◆ mDeque

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

Definition at line 160 of file RPCSub.cpp.

◆ j_

beast::Journal const xrpl::RPCSubImp::j_
private

Definition at line 162 of file RPCSub.cpp.

◆ logs_

Logs& xrpl::RPCSubImp::logs_
private

Definition at line 163 of file RPCSub.cpp.

◆ mLock

std::mutex xrpl::InfoSub::mLock
protectedinherited

Definition at line 204 of file InfoSub.h.

◆ m_consumer

Consumer xrpl::InfoSub::m_consumer
privateinherited

Definition at line 207 of file InfoSub.h.

◆ m_source

Source& xrpl::InfoSub::m_source
privateinherited

Definition at line 208 of file InfoSub.h.

◆ realTimeSubscriptions_

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

Definition at line 209 of file InfoSub.h.

◆ normalSubscriptions_

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

Definition at line 210 of file InfoSub.h.

◆ request_

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

Definition at line 211 of file InfoSub.h.

◆ accountHistorySubscriptions_

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

Definition at line 213 of file InfoSub.h.

◆ apiVersion_

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

Definition at line 214 of file InfoSub.h.