Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
feed::SubscriptionManagerInterface Class Referenceabstract

Interface of subscription manager. A subscription manager is responsible for managing the subscriptions and publishing the feeds. More...

#include <SubscriptionManagerInterface.hpp>

Inheritance diagram for feed::SubscriptionManagerInterface:

Public Member Functions

virtual void stop ()=0
 Stop the SubscriptionManager and wait for all jobs to finish.
 
virtual void subBookChanges (SubscriberSharedPtr const &subscriber)=0
 Subscribe to the book changes feed.
 
virtual void unsubBookChanges (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the book changes feed.
 
virtual void pubBookChanges (ripple::LedgerHeader const &lgrInfo, std::vector< data::TransactionAndMetadata > const &transactions)=0
 Publish the book changes feed.
 
virtual void subProposedTransactions (SubscriberSharedPtr const &subscriber)=0
 Subscribe to the proposed transactions feed.
 
virtual void unsubProposedTransactions (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the proposed transactions feed.
 
virtual void subProposedAccount (ripple::AccountID const &account, SubscriberSharedPtr const &subscriber)=0
 Subscribe to the proposed transactions feed, only receive the feed when particular account is affected.
 
virtual void unsubProposedAccount (ripple::AccountID const &account, SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the proposed transactions feed for particular account.
 
virtual void forwardProposedTransaction (boost::json::object const &receivedTxJson)=0
 Forward the proposed transactions feed.
 
virtual boost::json::object subLedger (boost::asio::yield_context yield, SubscriberSharedPtr const &subscriber)=0
 Subscribe to the ledger feed.
 
virtual void unsubLedger (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the ledger feed.
 
virtual void pubLedger (ripple::LedgerHeader const &lgrInfo, ripple::Fees const &fees, std::string const &ledgerRange, std::uint32_t txnCount)=0
 Publish the ledger feed.
 
virtual void subManifest (SubscriberSharedPtr const &subscriber)=0
 Subscribe to the manifest feed.
 
virtual void unsubManifest (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the manifest feed.
 
virtual void forwardManifest (boost::json::object const &manifestJson)=0
 Forward the manifest feed.
 
virtual void subValidation (SubscriberSharedPtr const &subscriber)=0
 Subscribe to the validation feed.
 
virtual void unsubValidation (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the validation feed.
 
virtual void forwardValidation (boost::json::object const &validationJson)=0
 Forward the validation feed.
 
virtual void subTransactions (SubscriberSharedPtr const &subscriber)=0
 Subscribe to the transactions feed.
 
virtual void unsubTransactions (SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the transactions feed.
 
virtual void subAccount (ripple::AccountID const &account, SubscriberSharedPtr const &subscriber)=0
 Subscribe to the transactions feed, only receive the feed when particular account is affected.
 
virtual void unsubAccount (ripple::AccountID const &account, SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the transactions feed for particular account.
 
virtual void subBook (ripple::Book const &book, SubscriberSharedPtr const &subscriber)=0
 Subscribe to the transactions feed, only receive feed when particular order book is affected.
 
virtual void unsubBook (ripple::Book const &book, SubscriberSharedPtr const &subscriber)=0
 Unsubscribe to the transactions feed for particular order book.
 
virtual void pubTransaction (data::TransactionAndMetadata const &txMeta, ripple::LedgerHeader const &lgrInfo)=0
 Forward the transactions feed.
 
virtual boost::json::object report () const =0
 Get the number of subscribers.
 

Detailed Description

Interface of subscription manager. A subscription manager is responsible for managing the subscriptions and publishing the feeds.

Member Function Documentation

◆ forwardManifest()

virtual void feed::SubscriptionManagerInterface::forwardManifest ( boost::json::object const & manifestJson)
pure virtual

Forward the manifest feed.

Parameters
manifestJsonThe manifest json to forward.

Implemented in feed::SubscriptionManager.

◆ forwardProposedTransaction()

virtual void feed::SubscriptionManagerInterface::forwardProposedTransaction ( boost::json::object const & receivedTxJson)
pure virtual

Forward the proposed transactions feed.

Parameters
receivedTxJsonThe proposed transaction json.

Implemented in feed::SubscriptionManager.

◆ forwardValidation()

virtual void feed::SubscriptionManagerInterface::forwardValidation ( boost::json::object const & validationJson)
pure virtual

Forward the validation feed.

Parameters
validationJsonThe validation feed json to forward.

Implemented in feed::SubscriptionManager.

◆ pubBookChanges()

virtual void feed::SubscriptionManagerInterface::pubBookChanges ( ripple::LedgerHeader const & lgrInfo,
std::vector< data::TransactionAndMetadata > const & transactions )
pure virtual

Publish the book changes feed.

Parameters
lgrInfoThe current ledger header.
transactionsThe transactions in the current ledger.

Implemented in feed::SubscriptionManager.

◆ pubLedger()

virtual void feed::SubscriptionManagerInterface::pubLedger ( ripple::LedgerHeader const & lgrInfo,
ripple::Fees const & fees,
std::string const & ledgerRange,
std::uint32_t txnCount )
pure virtual

Publish the ledger feed.

Parameters
lgrInfoThe ledger header.
feesThe fees.
ledgerRangeThe ledger range.
txnCountThe transaction count.

Implemented in feed::SubscriptionManager.

◆ pubTransaction()

virtual void feed::SubscriptionManagerInterface::pubTransaction ( data::TransactionAndMetadata const & txMeta,
ripple::LedgerHeader const & lgrInfo )
pure virtual

Forward the transactions feed.

Parameters
txMetaThe transaction and metadata.
lgrInfoThe ledger header.

Implemented in feed::SubscriptionManager.

◆ report()

virtual boost::json::object feed::SubscriptionManagerInterface::report ( ) const
pure virtual

Get the number of subscribers.

Returns
The report of the number of subscribers

Implemented in feed::SubscriptionManager.

◆ stop()

virtual void feed::SubscriptionManagerInterface::stop ( )
pure virtual

Stop the SubscriptionManager and wait for all jobs to finish.

Implemented in feed::SubscriptionManager.

◆ subAccount()

virtual void feed::SubscriptionManagerInterface::subAccount ( ripple::AccountID const & account,
SubscriberSharedPtr const & subscriber )
pure virtual

Subscribe to the transactions feed, only receive the feed when particular account is affected.

Parameters
accountThe account to watch.
subscriber

Implemented in feed::SubscriptionManager.

◆ subBook()

virtual void feed::SubscriptionManagerInterface::subBook ( ripple::Book const & book,
SubscriberSharedPtr const & subscriber )
pure virtual

Subscribe to the transactions feed, only receive feed when particular order book is affected.

Parameters
bookThe book to watch.
subscriber

Implemented in feed::SubscriptionManager.

◆ subBookChanges()

virtual void feed::SubscriptionManagerInterface::subBookChanges ( SubscriberSharedPtr const & subscriber)
pure virtual

Subscribe to the book changes feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ subLedger()

virtual boost::json::object feed::SubscriptionManagerInterface::subLedger ( boost::asio::yield_context yield,
SubscriberSharedPtr const & subscriber )
pure virtual

Subscribe to the ledger feed.

Parameters
yieldThe coroutine context
subscriberThe subscriber to the ledger feed
Returns
The ledger feed

Implemented in feed::SubscriptionManager.

◆ subManifest()

virtual void feed::SubscriptionManagerInterface::subManifest ( SubscriberSharedPtr const & subscriber)
pure virtual

Subscribe to the manifest feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ subProposedAccount()

virtual void feed::SubscriptionManagerInterface::subProposedAccount ( ripple::AccountID const & account,
SubscriberSharedPtr const & subscriber )
pure virtual

Subscribe to the proposed transactions feed, only receive the feed when particular account is affected.

Parameters
accountThe account to watch.
subscriber

Implemented in feed::SubscriptionManager.

◆ subProposedTransactions()

virtual void feed::SubscriptionManagerInterface::subProposedTransactions ( SubscriberSharedPtr const & subscriber)
pure virtual

Subscribe to the proposed transactions feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ subTransactions()

virtual void feed::SubscriptionManagerInterface::subTransactions ( SubscriberSharedPtr const & subscriber)
pure virtual

Subscribe to the transactions feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ subValidation()

virtual void feed::SubscriptionManagerInterface::subValidation ( SubscriberSharedPtr const & subscriber)
pure virtual

Subscribe to the validation feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubAccount()

virtual void feed::SubscriptionManagerInterface::unsubAccount ( ripple::AccountID const & account,
SubscriberSharedPtr const & subscriber )
pure virtual

Unsubscribe to the transactions feed for particular account.

Parameters
accountThe account to stop watching
subscriberThe subscriber to unsubscribe

Implemented in feed::SubscriptionManager.

◆ unsubBook()

virtual void feed::SubscriptionManagerInterface::unsubBook ( ripple::Book const & book,
SubscriberSharedPtr const & subscriber )
pure virtual

Unsubscribe to the transactions feed for particular order book.

Parameters
bookThe book to watch.
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubBookChanges()

virtual void feed::SubscriptionManagerInterface::unsubBookChanges ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the book changes feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubLedger()

virtual void feed::SubscriptionManagerInterface::unsubLedger ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the ledger feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubManifest()

virtual void feed::SubscriptionManagerInterface::unsubManifest ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the manifest feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubProposedAccount()

virtual void feed::SubscriptionManagerInterface::unsubProposedAccount ( ripple::AccountID const & account,
SubscriberSharedPtr const & subscriber )
pure virtual

Unsubscribe to the proposed transactions feed for particular account.

Parameters
accountThe account to stop watching.
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubProposedTransactions()

virtual void feed::SubscriptionManagerInterface::unsubProposedTransactions ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the proposed transactions feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubTransactions()

virtual void feed::SubscriptionManagerInterface::unsubTransactions ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the transactions feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.

◆ unsubValidation()

virtual void feed::SubscriptionManagerInterface::unsubValidation ( SubscriberSharedPtr const & subscriber)
pure virtual

Unsubscribe to the validation feed.

Parameters
subscriber

Implemented in feed::SubscriptionManager.


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