#include <DiscoveryAgent.h>
Inherits dtn::daemon::IndependentComponent, and ibrcommon::SimpleTimerCallback.
Inherited by dtn::net::IPNDAgent.

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 |
Definition at line 30 of file DiscoveryAgent.h.
| 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.
| 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().

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

| void dtn::net::DiscoveryAgent::received | ( | const DiscoveryAnnouncement & | announcement | ) |
Definition at line 58 of file DiscoveryAgent.cpp.
References _config, dtn::net::DiscoveryAnnouncement::getEID(), dtn::net::DiscoveryService::getName(), dtn::net::DiscoveryService::getParameters(), dtn::net::DiscoveryAnnouncement::getServices(), dtn::data::EID::getString(), dtn::core::NODE_INFO_UPDATED, dtn::core::NodeEvent::raise(), dtn::core::Node::setAddress(), dtn::core::Node::setPort(), dtn::core::Node::setProtocol(), dtn::core::Node::setTimeout(), dtn::core::Node::setURI(), dtn::daemon::Configuration::Discovery::timeout(), and dtn::utils::Utils::tokenize().
Referenced by dtn::net::IPNDAgent::componentRun().

| 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.
| timer | The reference to the timer which timed out. |
Implements ibrcommon::SimpleTimerCallback.
Definition at line 120 of file DiscoveryAgent.cpp.
References _config, dtn::daemon::Configuration::Discovery::announce(), and sendAnnoucement().

const dtn::daemon::Configuration::Discovery& dtn::net::DiscoveryAgent::_config [protected] |
Definition at line 49 of file DiscoveryAgent.h.
Referenced by dtn::net::IPNDAgent::IPNDAgent(), received(), dtn::net::IPNDAgent::sendAnnoucement(), and timeout().
1.7.1