IBR-DTNSuite
0.12
|
#include <EMailConvergenceLayer.h>
Public Member Functions | |
EMailConvergenceLayer () | |
virtual | ~EMailConvergenceLayer () |
void | raiseEvent (const dtn::core::Event *event) throw () |
void | onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &beacon) throw (DiscoveryBeaconHandler::NoServiceHereException) |
dtn::core::Node::Protocol | getDiscoveryProtocol () const |
void | queue (const dtn::core::Node &node, const dtn::net::BundleTransfer &job) |
virtual const std::string | getName () const |
Public Member Functions inherited from dtn::net::ConvergenceLayer | |
virtual | ~ConvergenceLayer ()=0 |
virtual void | open (const dtn::core::Node &) |
virtual void | resetStats () |
virtual void | getStats (ConvergenceLayer::stats_data &data) const |
Public Member Functions inherited from dtn::core::EventReceiver | |
virtual | ~EventReceiver ()=0 |
Public Member Functions inherited from dtn::net::DiscoveryBeaconHandler | |
virtual | ~DiscoveryBeaconHandler ()=0 |
virtual void | onAdvertiseBeacon (const ibrcommon::vinterface &iface, const DiscoveryBeacon &beacon) throw () |
Public Member Functions inherited from dtn::daemon::IntegratedComponent | |
IntegratedComponent () | |
virtual | ~IntegratedComponent () |
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 | __cancellation () throw () |
void | componentUp () throw () |
void | componentDown () throw () |
Additional Inherited Members | |
Public Types inherited from dtn::net::ConvergenceLayer | |
typedef std::pair< string, string > | stats_pair |
typedef std::map< string, string > | stats_data |
Definition at line 38 of file EMailConvergenceLayer.h.
dtn::net::EMailConvergenceLayer::EMailConvergenceLayer | ( | ) |
Creates a new instance of the email convergence layer
Definition at line 36 of file EMailConvergenceLayer.cpp.
References dtn::core::EventDispatcher< E >::add().
|
virtual |
Default destructor
Definition at line 46 of file EMailConvergenceLayer.cpp.
References dtn::core::EventDispatcher< E >::remove().
|
protected |
Definition at line 121 of file EMailConvergenceLayer.cpp.
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 129 of file EMailConvergenceLayer.cpp.
References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::unregisterService().
|
protectedvirtual |
Implements dtn::daemon::IntegratedComponent.
Definition at line 123 of file EMailConvergenceLayer.cpp.
References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), and dtn::net::DiscoveryAgent::registerService().
|
virtual |
Returns the discovery protocol type:
Implements dtn::net::ConvergenceLayer.
Definition at line 81 of file EMailConvergenceLayer.cpp.
References dtn::core::Node::CONN_EMAIL.
|
virtual |
Implements dtn::daemon::Component.
Definition at line 116 of file EMailConvergenceLayer.cpp.
|
virtual |
This method updates the given values for discovery service. It publishes the email address of the EMail Convergence Layer
Reimplemented from dtn::net::DiscoveryBeaconHandler.
Definition at line 75 of file EMailConvergenceLayer.cpp.
|
virtual |
Function for sending a bundle to the given node. If submitting in intervals is enabled, the job will be stored in a queue and will be processed later. Otherwise the bundle will be send without delay. After a successful transmission the job will be stored in a second queue which will be used to map returning mails to the right job.
node | The receiving node |
job | The needed information for processing the job |
Implements dtn::net::ConvergenceLayer.
Definition at line 86 of file EMailConvergenceLayer.cpp.
References dtn::core::Node::CONN_EMAIL, dtn::core::Node::get(), dtn::net::BundleTransfer::getBundle(), dtn::core::Node::getEID(), dtn::daemon::Configuration::EMail::getSmtpSubmitInterval(), dtn::data::EID::getString(), IBRCOMMON_LOGGER, IBRCOMMON_LOGGER_ENDL, ibrcommon::LogLevel::info, dtn::net::EMailSmtpService::queueTask(), dtn::net::TransferAbortedEvent::raise(), dtn::net::TransferAbortedEvent::REASON_UNDEFINED, dtn::net::EMailSmtpService::submitNow(), and dtn::utils::Utils::tokenize().
|
virtual |
This function will handle all incoming events. The EMail Convergence Layer is registered to the following events:
Implements dtn::core::EventReceiver.
Definition at line 51 of file EMailConvergenceLayer.cpp.
References dtn::data::SDNV< E >::get(), dtn::core::TimeEvent::getAction(), dtn::core::TimeEvent::getTimestamp(), and dtn::core::TIME_SECOND_TICK.