CatapultServer  v0.5.0.1 (Elephant)
catapult::zeromq::ZeroMqEntityPublisher Class Reference

A zeromq entity publisher. More...

Classes

class  SynchronizedPublisher
 
struct  WeakTransactionInfo
 

Public Member Functions

 ZeroMqEntityPublisher (unsigned short port, std::unique_ptr< model::NotificationPublisher > &&pNotificationPublisher)
 Creates a zeromq entity publisher around port and pNotificationPublisher. More...
 
 ~ZeroMqEntityPublisher ()
 
void publishBlockHeader (const model::BlockElement &blockElement)
 Publishes the block header in blockElement. More...
 
void publishDropBlocks (Height height)
 Publishes the height after which all blocks were dropped. More...
 
void publishTransaction (TransactionMarker topicMarker, const model::TransactionElement &transactionElement, Height height)
 Publishes a transaction using topicMarker, transactionElement and height. More...
 
void publishTransaction (TransactionMarker topicMarker, const model::TransactionInfo &transactionInfo, Height height)
 Publishes a transaction using topicMarker, transactionInfo and height. More...
 
void publishTransactionHash (TransactionMarker topicMarker, const model::TransactionInfo &transactionInfo)
 Publishes a transaction hash using topicMarker and transactionInfo. More...
 
void publishTransactionStatus (const model::Transaction &transaction, const Hash256 &hash, uint32_t status)
 Publishes a transaction status composed of transaction, hash and status. More...
 
void publishCosignature (const model::TransactionInfo &parentTransactionInfo, const Key &signer, const Signature &signature)
 Publishes a cosignature composed of transaction info (parentTransactionInfo), signer and signature. More...
 

Private Types

using MessagePayloadBuilder = consumer< zmq::multipart_t & >
 

Private Member Functions

void publishTransaction (TransactionMarker topicMarker, const WeakTransactionInfo &transactionInfo, Height height)
 
void publish (const std::string &topicName, TransactionMarker topicMarker, const WeakTransactionInfo &transactionInfo, const MessagePayloadBuilder &payloadBuilder)
 

Private Attributes

std::unique_ptr< model::NotificationPublisherm_pNotificationPublisher
 
std::unique_ptr< SynchronizedPublisherm_pSynchronizedPublisher
 

Detailed Description

A zeromq entity publisher.

Member Typedef Documentation

◆ MessagePayloadBuilder

Constructor & Destructor Documentation

◆ ZeroMqEntityPublisher()

catapult::zeromq::ZeroMqEntityPublisher::ZeroMqEntityPublisher ( unsigned short  port,
std::unique_ptr< model::NotificationPublisher > &&  pNotificationPublisher 
)
explicit

Creates a zeromq entity publisher around port and pNotificationPublisher.

◆ ~ZeroMqEntityPublisher()

catapult::zeromq::ZeroMqEntityPublisher::~ZeroMqEntityPublisher ( )
default

Member Function Documentation

◆ publish()

void catapult::zeromq::ZeroMqEntityPublisher::publish ( const std::string &  topicName,
TransactionMarker  topicMarker,
const WeakTransactionInfo transactionInfo,
const MessagePayloadBuilder payloadBuilder 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ publishBlockHeader()

void catapult::zeromq::ZeroMqEntityPublisher::publishBlockHeader ( const model::BlockElement blockElement)

Publishes the block header in blockElement.

◆ publishCosignature()

void catapult::zeromq::ZeroMqEntityPublisher::publishCosignature ( const model::TransactionInfo parentTransactionInfo,
const Key signer,
const Signature signature 
)

Publishes a cosignature composed of transaction info (parentTransactionInfo), signer and signature.

Here is the call graph for this function:

◆ publishDropBlocks()

void catapult::zeromq::ZeroMqEntityPublisher::publishDropBlocks ( Height  height)

Publishes the height after which all blocks were dropped.

◆ publishTransaction() [1/3]

void catapult::zeromq::ZeroMqEntityPublisher::publishTransaction ( TransactionMarker  topicMarker,
const model::TransactionElement transactionElement,
Height  height 
)

Publishes a transaction using topicMarker, transactionElement and height.

Here is the caller graph for this function:

◆ publishTransaction() [2/3]

void catapult::zeromq::ZeroMqEntityPublisher::publishTransaction ( TransactionMarker  topicMarker,
const model::TransactionInfo transactionInfo,
Height  height 
)

Publishes a transaction using topicMarker, transactionInfo and height.

Here is the call graph for this function:

◆ publishTransaction() [3/3]

void catapult::zeromq::ZeroMqEntityPublisher::publishTransaction ( TransactionMarker  topicMarker,
const WeakTransactionInfo transactionInfo,
Height  height 
)
private
Here is the call graph for this function:

◆ publishTransactionHash()

void catapult::zeromq::ZeroMqEntityPublisher::publishTransactionHash ( TransactionMarker  topicMarker,
const model::TransactionInfo transactionInfo 
)

Publishes a transaction hash using topicMarker and transactionInfo.

Here is the call graph for this function:

◆ publishTransactionStatus()

void catapult::zeromq::ZeroMqEntityPublisher::publishTransactionStatus ( const model::Transaction transaction,
const Hash256 hash,
uint32_t  status 
)

Publishes a transaction status composed of transaction, hash and status.

Here is the call graph for this function:

Member Data Documentation

◆ m_pNotificationPublisher

std::unique_ptr<model::NotificationPublisher> catapult::zeromq::ZeroMqEntityPublisher::m_pNotificationPublisher
private

◆ m_pSynchronizedPublisher

std::unique_ptr<SynchronizedPublisher> catapult::zeromq::ZeroMqEntityPublisher::m_pSynchronizedPublisher
private

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