#include <Service.h>

Public Member Functions | |
| Service (string name) | |
| virtual | ~Service () |
| void | start () |
| void | abort () |
| void | waitFor () |
| bool | isRunning () |
| string | getName () |
Protected Member Functions | |
| virtual void | tick ()=0 |
| void | finished () |
| virtual void | initialize () |
| virtual void | terminate () |
Private Member Functions | |
| void | run () |
Static Private Member Functions | |
| static void * | entryPoint (void *) |
Private Attributes | |
| bool | m_running |
| bool | m_started |
| pthread_t | m_thread |
| string | m_name |
| dtn::utils::Service::Service | ( | string | name | ) |
constructor with a name to identify the service or make debugging easier.
| dtn::utils::Service::~Service | ( | ) | [virtual] |
destructor
References abort().
| void dtn::utils::Service::start | ( | ) |
References entryPoint(), m_running, m_started, and m_thread.
Referenced by dtn::core::BundleCore::BundleCore(), emma::EmmaConvergenceLayer::initialize(), dtn::core::MultiplexConvergenceLayer::initialize(), and main().
| void dtn::utils::Service::abort | ( | ) |
| bool dtn::utils::Service::isRunning | ( | ) |
| string dtn::utils::Service::getName | ( | ) |
References m_name.
| virtual void dtn::utils::Service::tick | ( | ) | [protected, pure virtual] |
overload this method to do your own stuff.
Implemented in dtn::core::BundleCore, dtn::core::BundleRouter, dtn::core::CustodyManager, dtn::core::SimpleBundleStorage, dtn::core::TCPConvergenceLayer, dtn::core::UDPConvergenceLayer, dtn::daemon::TestApplication, emma::GPSConnector, and emma::MeasurementWorker.
Referenced by run().
| virtual void dtn::utils::Service::initialize | ( | ) | [inline, protected, virtual] |
| virtual void dtn::utils::Service::terminate | ( | ) | [inline, protected, virtual] |
Reimplemented in dtn::core::BundleRouter, dtn::core::CustodyManager, dtn::core::SimpleBundleStorage, emma::GPSConnector, and emma::MeasurementWorker.
Referenced by abort().
| void dtn::utils::Service::run | ( | ) | [private] |
| void * dtn::utils::Service::entryPoint | ( | void * | pthis | ) | [static, private] |
bool dtn::utils::Service::m_running [private] |
Referenced by finished(), isRunning(), run(), and start().
bool dtn::utils::Service::m_started [private] |
pthread_t dtn::utils::Service::m_thread [private] |
string dtn::utils::Service::m_name [private] |
Referenced by getName().
1.5.6