#include <service.h>

Public Member Functions | |
| ServiceState | getState () |
| virtual std::string | getStatusString () |
| Service () | |
| virtual bool | shutdown () |
| virtual bool | start () |
| virtual | ~Service ()=default |
Protected Member Functions | |
| void | setState (ServiceState new_state) |
Private Attributes | |
| ObservableObject< ServiceState > | state_ |
Interface that defines init, start, and shutdown methods for an implementing class to define.
|
virtualdefault |
|
inline |
|
inlinevirtual |
Return a descriptive string describing the service and it's state.
Reimplemented in RunnableService.
|
inlineprotected |
|
inlinevirtual |
Cleanup. Should be called before destruction. The format overriding classes should use is the following:
virtual bool shutdown() { // immediately set the shutdown state bool b = Service::shutdown();
// do specific shutdown logic here
// return the result of Service::shutdown() or something else if desired return b; }
Reimplemented in DataBatcher< T >, DataBatcher< int >, RunnableService, Publisher< T >, Publisher< std::string >, Aws::CloudWatch::CloudWatchService< D, T >, TestBatcher, and HardWorker.
|
inlinevirtual |
Called to start doing work. The format overriding classes should use is the following:
virtual bool start() { // do specific start logic here
// ensure the service state has been set to started bool b = Service::start();
// return the result of Service::start() or something else if desired return b; }
Reimplemented in RunnableService, Aws::CloudWatch::CloudWatchService< D, T >, and TestBatcher.
|
private |