IBR-DTNSuite
0.12
|
#include <EMailSmtpService.h>
Classes | |
class | Task |
Public Member Functions | |
void | queueTask (Task *t) |
void | submitNow (Task *t) |
void | submitQueue () |
void | run () throw () |
void | __cancellation () throw () |
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 () |
Static Public Member Functions | |
static EMailSmtpService & | getInstance () |
Additional Inherited Members | |
Protected Member Functions inherited from ibrcommon::JoinableThread | |
JoinableThread (size_t size=DEFAULT_STACKSIZE) | |
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 () |
Definition at line 39 of file EMailSmtpService.h.
|
virtual |
The cancellation method of the thread
Implements ibrcommon::Thread.
Definition at line 181 of file EMailSmtpService.cpp.
References ibrcommon::Queue< T >::abort(), and ibrcommon::Mutex::leave().
|
static |
Returns the instance of the SMTP service
Definition at line 41 of file EMailSmtpService.cpp.
void dtn::net::EMailSmtpService::queueTask | ( | Task * | t) |
Stores the given task in the submit queue
t | The task which will be stored in the submit queue |
Definition at line 262 of file EMailSmtpService.cpp.
References ibrcommon::Queue< T >::push().
Referenced by dtn::net::EMailConvergenceLayer::queue().
|
virtual |
The run method of the thread
Implements ibrcommon::Thread.
Definition at line 123 of file EMailSmtpService.cpp.
References dtn::storage::BundleStorage::contains(), ibrcommon::Mutex::enter(), ibrcommon::LogLevel::error, dtn::net::BundleTransfer::getBundle(), dtn::core::Node::getEID(), dtn::net::EMailImapService::getInstance(), dtn::net::EMailSmtpService::Task::getJob(), dtn::net::EMailSmtpService::Task::getNode(), ibrcommon::Queue< T >::getnpop(), dtn::daemon::Configuration::EMail::getSmtpKeepAliveTimeout(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, ibrcommon::Mutex::leave(), dtn::net::TransferAbortedEvent::raise(), dtn::net::TransferAbortedEvent::REASON_CONNECTION_DOWN, dtn::net::TransferAbortedEvent::REASON_UNDEFINED, and dtn::net::EMailImapService::storeProcessedTask().
void dtn::net::EMailSmtpService::submitNow | ( | Task * | t) |
Submits the given task immediately
t | The task which will be transmitted immediately |
Definition at line 267 of file EMailSmtpService.cpp.
References ibrcommon::Mutex::leave(), and ibrcommon::Queue< T >::push().
Referenced by dtn::net::EMailConvergenceLayer::queue().
void dtn::net::EMailSmtpService::submitQueue | ( | ) |
Submits all stored tasks
Definition at line 273 of file EMailSmtpService.cpp.
References ibrcommon::Mutex::leave().