IBR-DTNSuite
0.12
|
#include <Component.h>
Public Member Functions | |
IndependentComponent () | |
virtual | ~IndependentComponent () |
virtual void | initialize () throw () |
virtual void | startup () throw () |
virtual void | terminate () throw () |
Public Member Functions inherited from dtn::daemon::Component | |
virtual | ~Component ()=0 |
virtual const std::string | getName () const =0 |
Protected Member Functions | |
void | run () throw () |
virtual void | __cancellation ()=0 throw () |
virtual void | componentUp ()=0 throw () |
virtual void | componentRun ()=0 throw () |
virtual void | componentDown ()=0 throw () |
Protected Member Functions inherited from ibrcommon::JoinableThread | |
virtual | ~JoinableThread ()=0 |
void | join (void) throw (ThreadException) |
bool | isRunning (void) |
void | start (int priority=0) throw (ThreadException) |
void | stop () throw () |
JoinableThread (size_t size=DEFAULT_STACKSIZE) | |
Additional Inherited Members |
Independent components are working in an own thread.
Definition at line 70 of file Component.h.
dtn::daemon::IndependentComponent::IndependentComponent | ( | ) |
Definition at line 34 of file Component.cpp.
|
virtual |
Definition at line 38 of file Component.cpp.
References ibrcommon::JoinableThread::join().
|
protectedpure virtual |
This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.
Implements ibrcommon::Thread.
Implemented in dtn::storage::SQLiteBundleStorage, dtn::dht::DHTNameService, dtn::net::TCPConvergenceLayer, dtn::net::DatagramConvergenceLayer, dtn::net::LOWPANConvergenceLayer, dtn::net::HTTPConvergenceLayer, dtn::net::UDPConvergenceLayer, dtn::api::ApiServer, dtn::net::IPNDAgent, dtn::core::FragmentManager, dtn::net::FileMonitor, dtn::net::FileConvergenceLayer, and dtn::net::WifiP2PManager.
|
protectedpure virtual |
This method is called if the component should stop. Clean-up code should be inserted here.
Implemented in dtn::dht::DHTNameService, dtn::storage::SQLiteBundleStorage, dtn::net::TCPConvergenceLayer, dtn::net::DatagramConvergenceLayer, dtn::net::LOWPANConvergenceLayer, dtn::net::HTTPConvergenceLayer, dtn::api::ApiServer, dtn::net::UDPConvergenceLayer, dtn::core::FragmentManager, dtn::net::IPNDAgent, dtn::net::FileMonitor, dtn::net::WifiP2PManager, and dtn::net::FileConvergenceLayer.
Referenced by terminate().
|
protectedpure virtual |
This is the run method. The component should loop in there until componentDown() or __cancellation() is called.
Implemented in dtn::dht::DHTNameService, dtn::storage::SQLiteBundleStorage, dtn::net::TCPConvergenceLayer, dtn::net::DatagramConvergenceLayer, dtn::net::LOWPANConvergenceLayer, dtn::net::HTTPConvergenceLayer, dtn::api::ApiServer, dtn::net::UDPConvergenceLayer, dtn::core::FragmentManager, dtn::net::IPNDAgent, dtn::net::FileMonitor, dtn::net::WifiP2PManager, and dtn::net::FileConvergenceLayer.
Referenced by run().
|
protectedpure virtual |
Is called in preparation of the component. Before componentRun() is called.
Implemented in dtn::storage::SQLiteBundleStorage, dtn::dht::DHTNameService, dtn::net::TCPConvergenceLayer, dtn::net::DatagramConvergenceLayer, dtn::net::LOWPANConvergenceLayer, dtn::net::HTTPConvergenceLayer, dtn::api::ApiServer, dtn::net::UDPConvergenceLayer, dtn::core::FragmentManager, dtn::net::IPNDAgent, dtn::net::FileMonitor, dtn::net::WifiP2PManager, and dtn::net::FileConvergenceLayer.
Referenced by initialize().
|
virtual |
Set up the component. At this stage no other components should be used.
Implements dtn::daemon::Component.
Definition at line 43 of file Component.cpp.
References componentUp().
|
protectedvirtual |
Abstract interface for thread context run method.
Implements ibrcommon::Thread.
Definition at line 66 of file Component.cpp.
References componentRun().
|
virtual |
Start up the component. At this stage all other components are ready.
Implements dtn::daemon::Component.
Definition at line 51 of file Component.cpp.
References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, and ibrcommon::Exception::what().
|
virtual |
Terminate the component and do some cleanup stuff. All other components still exists, but may not serve signals.
Implements dtn::daemon::Component.
Definition at line 60 of file Component.cpp.
References componentDown().