IBR-DTNSuite  0.10
dtn::net::FileMonitor Class Reference

#include <FileMonitor.h>

Inheritance diagram for dtn::net::FileMonitor:
Inheritance graph
Collaboration diagram for dtn::net::FileMonitor:
Collaboration graph

Public Member Functions

 FileMonitor ()
 
virtual ~FileMonitor ()
 
void watch (const ibrcommon::File &watch)
 
const std::string getName () const
 
- Public Member Functions inherited from dtn::daemon::IndependentComponent
 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
 

Protected Member Functions

void componentUp () throw ()
 
void componentRun () throw ()
 
void componentDown () throw ()
 
void __cancellation () throw ()
 
- Protected Member Functions inherited from dtn::daemon::IndependentComponent
void run () 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

Detailed Description

Definition at line 55 of file FileMonitor.h.

Constructor & Destructor Documentation

dtn::net::FileMonitor::FileMonitor ( )

Definition at line 94 of file FileMonitor.cpp.

dtn::net::FileMonitor::~FileMonitor ( )
virtual

Definition at line 99 of file FileMonitor.cpp.

References ibrcommon::JoinableThread::join().

Here is the call graph for this function:

Member Function Documentation

void dtn::net::FileMonitor::__cancellation ( ) throw ()
protectedvirtual

This method is called after componentDown() and should should guarantee that blocking calls in componentRun() will unblock.

Implements dtn::daemon::IndependentComponent.

Definition at line 167 of file FileMonitor.cpp.

References ibrcommon::vsocket::down().

Here is the call graph for this function:

void dtn::net::FileMonitor::componentDown ( ) throw ()
protectedvirtual

This method is called if the component should stop. Clean-up code should be inserted here.

Implements dtn::daemon::IndependentComponent.

Definition at line 162 of file FileMonitor.cpp.

References ibrcommon::vsocket::down().

Here is the call graph for this function:

void dtn::net::FileMonitor::componentRun ( ) throw ()
protectedvirtual

This is the run method. The component should loop in there until componentDown() or __cancellation() is called.

Implements dtn::daemon::IndependentComponent.

Definition at line 131 of file FileMonitor.cpp.

References dtn::net::inotifysocket::read(), ibrcommon::vsocket::select(), and ibrcommon::Thread::sleep().

Here is the call graph for this function:

void dtn::net::FileMonitor::componentUp ( ) throw ()
protectedvirtual

Is called in preparation of the component. Before componentRun() is called.

Implements dtn::daemon::IndependentComponent.

Definition at line 121 of file FileMonitor.cpp.

References ibrcommon::LogLevel::error, IBRCOMMON_LOGGER_ENDL, IBRCOMMON_LOGGER_TAG, ibrcommon::vsocket::up(), and ibrcommon::Exception::what().

Here is the call graph for this function:

const std::string dtn::net::FileMonitor::getName ( ) const
virtual

Return an identifier for this component

Returns

Implements dtn::daemon::Component.

Definition at line 257 of file FileMonitor.cpp.

void dtn::net::FileMonitor::watch ( const ibrcommon::File watch)

The documentation for this class was generated from the following files: