IBR-DTNSuite  0.12
dtn::net::EMailConvergenceLayer Class Reference

#include <EMailConvergenceLayer.h>

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

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
 

Detailed Description

Definition at line 38 of file EMailConvergenceLayer.h.

Constructor & Destructor Documentation

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().

Here is the call graph for this function:

dtn::net::EMailConvergenceLayer::~EMailConvergenceLayer ( )
virtual

Default destructor

Definition at line 46 of file EMailConvergenceLayer.cpp.

References dtn::core::EventDispatcher< E >::remove().

Here is the call graph for this function:

Member Function Documentation

void dtn::net::EMailConvergenceLayer::__cancellation ( )
throw (
)
protected

Definition at line 121 of file EMailConvergenceLayer.cpp.

void dtn::net::EMailConvergenceLayer::componentDown ( )
throw (
)
protectedvirtual
void dtn::net::EMailConvergenceLayer::componentUp ( )
throw (
)
protectedvirtual
dtn::core::Node::Protocol dtn::net::EMailConvergenceLayer::getDiscoveryProtocol ( ) const
virtual

Returns the discovery protocol type:

  • "dtn::core::Node::CONN_EMAIL"
Returns
Returns the protocol type

Implements dtn::net::ConvergenceLayer.

Definition at line 81 of file EMailConvergenceLayer.cpp.

References dtn::core::Node::CONN_EMAIL.

const std::string dtn::net::EMailConvergenceLayer::getName ( ) const
virtual
See Also
Component::getName()

Implements dtn::daemon::Component.

Definition at line 116 of file EMailConvergenceLayer.cpp.

void dtn::net::EMailConvergenceLayer::onUpdateBeacon ( const ibrcommon::vinterface iface,
DiscoveryBeacon beacon 
)
throw (DiscoveryBeaconHandler::NoServiceHereException
)
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.

void dtn::net::EMailConvergenceLayer::queue ( const dtn::core::Node node,
const dtn::net::BundleTransfer job 
)
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.

Parameters
nodeThe receiving node
jobThe 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().

Here is the call graph for this function:

void dtn::net::EMailConvergenceLayer::raiseEvent ( const dtn::core::Event event)
throw (
)
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.

Here is the call graph for this function:


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