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

#include <HTTPConvergenceLayer.h>

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

Public Member Functions

 DownloadThread (ibrcommon::iobuffer &buf)
 
virtual ~DownloadThread ()
 
- Public 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 ()
 

Protected Member Functions

void run () throw ()
 
void __cancellation () throw ()
 
- Protected Member Functions inherited from ibrcommon::JoinableThread
 JoinableThread (size_t size=DEFAULT_STACKSIZE)
 
- Protected Member Functions inherited from ibrcommon::Thread
virtual ~Thread ()=0
 
void reset () throw (ThreadException)
 
virtual void setup (void) throw ()
 
virtual void finally (void) throw ()
 
bool isFinalized () throw ()
 
bool operator== (const ibrcommon::Thread &other)
 
 Thread (size_t stack=DEFAULT_STACKSIZE)
 
int kill (int sig)
 
void cancel () throw ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from ibrcommon::Thread
static size_t getNumberOfProcessors ()
 
static void yield (void)
 
static void sleep (time_t timeout)
 
static void concurrency (int level)
 
static bool equal (pthread_t thread1, pthread_t thread2)
 
static void * __execute__ (void *obj) throw ()
 

Detailed Description

Definition at line 104 of file HTTPConvergenceLayer.h.

Constructor & Destructor Documentation

dtn::net::DownloadThread::DownloadThread ( ibrcommon::iobuffer buf)

DownloadThread constructor, connects the istream _stream variable to the iobuffer and the DownloadThread::run() method is reading and evaluating the stream.

Parameters
bufIs an iobuffer where received data is written.

Definition at line 125 of file HTTPConvergenceLayer.cpp.

dtn::net::DownloadThread::~DownloadThread ( )
virtual

DownloadThread destructor, calls the join() method to stop the joinable thread.

Definition at line 134 of file HTTPConvergenceLayer.cpp.

References ibrcommon::JoinableThread::join().

Here is the call graph for this function:

Member Function Documentation

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

Implements ibrcommon::Thread.

Definition at line 168 of file HTTPConvergenceLayer.cpp.

void dtn::net::DownloadThread::run ( void  ) throw ()
protectedvirtual

Joinable Thread run method, this thread starts when the componentRun() method is running and connected to the tomcat server. This thread is watching permanent on the istream of the ibrcommon::iobuffer. When a valid bundle is detected a BundleReceivedEvent will be raised.

Implements ibrcommon::Thread.

Definition at line 146 of file HTTPConvergenceLayer.cpp.

References dtn::core::BundleCore::getInstance(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, dtn::net::BundleReceivedEvent::raise(), ibrcommon::Exception::what(), and ibrcommon::Thread::yield().

Here is the call graph for this function:


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