Public Member Functions | Protected Member Functions | Protected Attributes

dtn::net::DiscoveryAgent Class Reference

#include <DiscoveryAgent.h>

Inherits dtn::daemon::IndependentComponent, and ibrcommon::SimpleTimerCallback.

Inherited by dtn::net::IPNDAgent.

Collaboration diagram for dtn::net::DiscoveryAgent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DiscoveryAgent (const dtn::daemon::Configuration::Discovery &config)
virtual ~DiscoveryAgent ()=0
void received (const DiscoveryAnnouncement &announcement)
void addService (string name, string parameters)
void addService (DiscoveryServiceProvider *provider)
virtual size_t timeout (size_t identifier)

Protected Member Functions

virtual void componentUp ()
virtual void componentDown ()
virtual void componentRun ()=0
virtual void sendAnnoucement (const u_int16_t &sn, std::list< DiscoveryService > &services)=0

Protected Attributes

const
dtn::daemon::Configuration::Discovery
_config

Detailed Description

Definition at line 30 of file DiscoveryAgent.h.


Constructor & Destructor Documentation

dtn::net::DiscoveryAgent::DiscoveryAgent ( const dtn::daemon::Configuration::Discovery config  ) 

Definition at line 23 of file DiscoveryAgent.cpp.

dtn::net::DiscoveryAgent::~DiscoveryAgent (  )  [pure virtual]

Definition at line 28 of file DiscoveryAgent.cpp.


Member Function Documentation

void dtn::net::DiscoveryAgent::addService ( string  name,
string  parameters 
)

Definition at line 46 of file DiscoveryAgent.cpp.

Referenced by createConvergenceLayers().

void dtn::net::DiscoveryAgent::addService ( DiscoveryServiceProvider provider  ) 

Definition at line 52 of file DiscoveryAgent.cpp.

void dtn::net::DiscoveryAgent::componentDown (  )  [protected, virtual]

Definition at line 38 of file DiscoveryAgent.cpp.

References ibrcommon::JoinableThread::join(), ibrcommon::SimpleTimer::remove(), and ibrcommon::JoinableThread::stop().

Here is the call graph for this function:

virtual void dtn::net::DiscoveryAgent::componentRun (  )  [protected, pure virtual]
void dtn::net::DiscoveryAgent::componentUp (  )  [protected, virtual]

Definition at line 32 of file DiscoveryAgent.cpp.

References ibrcommon::SimpleTimer::set(), and ibrcommon::JoinableThread::start().

Here is the call graph for this function:

void dtn::net::DiscoveryAgent::received ( const DiscoveryAnnouncement announcement  ) 
virtual void dtn::net::DiscoveryAgent::sendAnnoucement ( const u_int16_t &  sn,
std::list< DiscoveryService > &  services 
) [protected, pure virtual]

Referenced by timeout().

size_t dtn::net::DiscoveryAgent::timeout ( size_t  identifier  )  [virtual]

This method will be called if the timer timed out.

Parameters:
timer The reference to the timer which timed out.
Returns:
The new countdown value.

Implements ibrcommon::SimpleTimerCallback.

Definition at line 120 of file DiscoveryAgent.cpp.

References _config, dtn::daemon::Configuration::Discovery::announce(), and sendAnnoucement().

Here is the call graph for this function:


Member Data Documentation


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