#include <FlowController.h>
Public Member Functions | |
| FlowController (net::config::ConfigInstance *configInstance) | |
| FlowController (const FlowController &)=delete | |
| FlowController & | operator= (const FlowController &)=delete |
| FlowController (FlowController &&)=delete | |
| FlowController & | operator= (FlowController &&)=delete |
| virtual | ~FlowController () |
| std::string | getInstanceName () const |
| uint64_t | getId () const |
| bool | terminateFlow () |
| bool | isTerminated () const |
| void | stopRetry () |
| bool | isRetryEnabled () const |
| ConcreteFlowController * | setOnFlowRetry (const std::function< void(ConcreteFlowController *)> &callback) |
| ConcreteFlowController * | setOnFlowCompleted (const std::function< void(uint64_t, const std::string &)> &callback) |
| ConcreteFlowController * | setOnFlowTerminated (const std::function< void(ConcreteFlowController *)> &callback) |
| void | startFlow (const std::function< void()> &callback) |
Protected Member Functions | |
| void | reportFlowRetry () |
| void | armRetryTimer (double timeoutSeconds, const std::function< void()> &dispatcher) |
| virtual void | terminateAsyncSubFlow ()=0 |
Private Member Functions | |
| void | cancelRetryTimer () |
| void | notifyFlowTerminated () |
Private Attributes | |
| uint64_t | id {idCounter++} |
| bool | retryEnabled {true} |
| bool | terminated {false} |
| net::config::ConfigInstance * | observedConfigInstance |
| std::unique_ptr< core::timer::Timer > | retryTimer |
| std::function< void(ConcreteFlowController *)> | onFlowRetryCallback |
| std::function< void(ConcreteFlowController *)> | onFlowTerminatedCallback |
Static Private Attributes | |
| static uint64_t | idCounter |
Definition at line 65 of file FlowController.h.
| core::socket::stream::FlowController< ConcreteFlowController >::FlowController | ( | net::config::ConfigInstance * | configInstance | ) |
Definition at line 57 of file FlowController.hpp.
References observedConfigInstance, and onFlowRetryCallback.
Referenced by core::socket::stream::ClientFlowController::ClientFlowController(), and core::socket::stream::ServerFlowController::ServerFlowController().
|
delete |
|
delete |
|
virtualdefault |
|
protected |
Definition at line 161 of file FlowController.hpp.
References retryEnabled, retryTimer, and core::timer::Timer::singleshotTimer().
|
private |
Definition at line 168 of file FlowController.hpp.
References core::Timer::cancel(), and retryTimer.
| uint64_t core::socket::stream::FlowController< ConcreteFlowController >::getId | ( | ) | const |
Definition at line 74 of file FlowController.hpp.
References id.
Referenced by setOnFlowCompleted().
| std::string core::socket::stream::FlowController< ConcreteFlowController >::getInstanceName | ( | ) | const |
Definition at line 69 of file FlowController.hpp.
References net::config::ConfigInstance::getInstanceName(), and observedConfigInstance.
| bool core::socket::stream::FlowController< ConcreteFlowController >::isRetryEnabled | ( | ) | const |
Definition at line 108 of file FlowController.hpp.
References retryEnabled.
| bool core::socket::stream::FlowController< ConcreteFlowController >::isTerminated | ( | ) | const |
|
private |
Definition at line 176 of file FlowController.hpp.
References onFlowTerminatedCallback.
|
delete |
|
delete |
|
protected |
Definition at line 156 of file FlowController.hpp.
References onFlowRetryCallback.
| ConcreteFlowController * core::socket::stream::FlowController< ConcreteFlowController >::setOnFlowCompleted | ( | const std::function< void(uint64_t, const std::string &)> & | callback | ) |
Definition at line 126 of file FlowController.hpp.
References getId(), net::config::ConfigInstance::getInstanceName(), observedConfigInstance, and net::config::ConfigInstance::setOnDestroy().
| ConcreteFlowController * core::socket::stream::FlowController< ConcreteFlowController >::setOnFlowRetry | ( | const std::function< void(ConcreteFlowController< ConcreteFlowController > *)> & | callback | ) |
Definition at line 114 of file FlowController.hpp.
References onFlowRetryCallback.
| ConcreteFlowController * core::socket::stream::FlowController< ConcreteFlowController >::setOnFlowTerminated | ( | const std::function< void(ConcreteFlowController< ConcreteFlowController > *)> & | callback | ) |
Definition at line 136 of file FlowController.hpp.
References onFlowTerminatedCallback.
| void core::socket::stream::FlowController< ConcreteFlowController >::startFlow | ( | const std::function< void()> & | callback | ) |
Definition at line 147 of file FlowController.hpp.
References core::EventReceiver::atNextTick(), and terminated.
| void core::socket::stream::FlowController< ConcreteFlowController >::stopRetry | ( | ) |
Definition at line 102 of file FlowController.hpp.
Referenced by core::socket::stream::ClientFlowController::terminateAsyncSubFlow(), and core::socket::stream::ServerFlowController::terminateAsyncSubFlow().
|
protectedpure virtual |
Implemented in core::socket::stream::ClientFlowController, and core::socket::stream::ServerFlowController.
| bool core::socket::stream::FlowController< ConcreteFlowController >::terminateFlow | ( | ) |
Definition at line 79 of file FlowController.hpp.
|
private |
Definition at line 101 of file FlowController.h.
Referenced by getId().
|
staticprivate |
Definition at line 102 of file FlowController.h.
|
private |
Definition at line 109 of file FlowController.h.
Referenced by FlowController(), getInstanceName(), and setOnFlowCompleted().
|
private |
Definition at line 113 of file FlowController.h.
Referenced by FlowController(), reportFlowRetry(), and setOnFlowRetry().
|
private |
Definition at line 114 of file FlowController.h.
Referenced by notifyFlowTerminated(), and setOnFlowTerminated().
|
private |
Definition at line 106 of file FlowController.h.
Referenced by armRetryTimer(), and isRetryEnabled().
|
private |
Definition at line 111 of file FlowController.h.
Referenced by armRetryTimer(), and cancelRetryTimer().
|
private |
Definition at line 107 of file FlowController.h.
Referenced by isTerminated(), core::socket::stream::FlowController< ClientFlowController >::isTerminated(), and startFlow().