CatapultServer
v0.5.0.1 (Elephant)
|
Simplifies interacting with remote nodes via apis. More...
Public Member Functions | |
RemoteApiForwarder (net::PacketIoPicker &packetIoPicker, const model::TransactionRegistry &transactionRegistry, const utils::TimeSpan &timeout, const std::string &operationName) | |
template<typename TRemoteApiAction , typename TRemoteApiFactory > | |
thread::future< ionet::NodeInteractionResult > | processSync (TRemoteApiAction action, TRemoteApiFactory apiFactory) const |
Picks a random peer and wraps an api around it using apiFactory. Finally, passes the api to action. More... | |
Private Attributes | |
net::PacketIoPicker & | m_packetIoPicker |
const model::TransactionRegistry & | m_transactionRegistry |
utils::TimeSpan | m_timeout |
std::string | m_operationName |
Simplifies interacting with remote nodes via apis.
|
inline |
Creates a forwarder around a peer selector (packetIoPicker) with a connection timeout given a transaction registry (transactionRegistry) and a friendly name (operationName).
|
inline |
Picks a random peer and wraps an api around it using apiFactory. Finally, passes the api to action.
|
private |
|
private |
|
private |
|
private |