IBR-DTNSuite  0.12
dtn::dht::DHTNameService Class Reference

#include <DHTNameService.h>

Inheritance diagram for dtn::dht::DHTNameService:
Inheritance graph
Collaboration diagram for dtn::dht::DHTNameService:
Collaboration graph

Public Member Functions

 DHTNameService ()
 
virtual ~DHTNameService ()
 
const std::string getName () const
 
void raiseEvent (const dtn::core::Event *evt) throw ()
 
void onUpdateBeacon (const ibrcommon::vinterface &iface, DiscoveryBeacon &beacon) throw (dtn::net::DiscoveryBeaconHandler::NoServiceHereException)
 
- Public Member Functions inherited from dtn::daemon::IndependentComponent
 IndependentComponent ()
 
virtual ~IndependentComponent ()
 
virtual void initialize () throw ()
 
virtual void startup () throw ()
 
virtual void terminate () throw ()
 
- Public Member Functions inherited from dtn::daemon::Component
virtual ~Component ()=0
 
- 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 ()
 

Protected Member Functions

void __cancellation () throw ()
 
void componentUp () throw ()
 
void componentRun () throw ()
 
void componentDown () throw ()
 
- Protected Member Functions inherited from dtn::daemon::IndependentComponent
void run () throw ()
 
- Protected 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 ()
 
 JoinableThread (size_t size=DEFAULT_STACKSIZE)
 

Additional Inherited Members

Detailed Description

This Service provides a Lookup service for node and group EIDs in a bittorrent DHT. It is fully event driven. It provides the following mechanisms: Publishes the own EID to the DHT, also as specific neighbour EIDs. Registers for Routing Events to look up automatically for the embedded EIDs in the DHT Adds the found EID with its Convergence Layers as a Node. Adds routes to the neighbour EIDs of the found EID. Uses IPND to announce the DHT name service to local neighbour nodes.

Definition at line 57 of file DHTNameService.h.

Constructor & Destructor Documentation

dtn::dht::DHTNameService::DHTNameService ( )

Definition at line 45 of file DHTNameService.cpp.

dtn::dht::DHTNameService::~DHTNameService ( )
virtual

Definition at line 51 of file DHTNameService.cpp.

Member Function Documentation

void dtn::dht::DHTNameService::__cancellation ( )
throw (
)
protectedvirtual

returns true

Implements dtn::daemon::IndependentComponent.

Definition at line 59 of file DHTNameService.cpp.

void dtn::dht::DHTNameService::componentDown ( )
throw (
)
protectedvirtual

Calls the interrupt pipe to exit the main loop. And so ends up the main loop indirectly

Implements dtn::daemon::IndependentComponent.

Definition at line 442 of file DHTNameService.cpp.

References dtn::core::BundleCore::getDiscoveryAgent(), dtn::core::BundleCore::getInstance(), IBRCOMMON_LOGGER_DEBUG_TAG, IBRCOMMON_LOGGER_ENDL, and dtn::net::DiscoveryAgent::unregisterService().

Here is the call graph for this function:

const std::string dtn::dht::DHTNameService::getName ( ) const
virtual

Returns the name of this Service: "DHT Naming Service"

Implements dtn::daemon::Component.

Definition at line 55 of file DHTNameService.cpp.

void dtn::dht::DHTNameService::onUpdateBeacon ( const ibrcommon::vinterface iface,
DiscoveryBeacon beacon 
)
throw (dtn::net::DiscoveryBeaconHandler::NoServiceHereException
)
virtual

this method updates the given values for discovery service It publishes the port number of the DHT instance

Reimplemented from dtn::net::DiscoveryBeaconHandler.

Definition at line 807 of file DHTNameService.cpp.

void dtn::dht::DHTNameService::raiseEvent ( const dtn::core::Event evt)
throw (
)
virtual

Handles all incomming Events, for which the Service is registered It is registered for this types of events: dtn::routing::QueueBundleEvent dtn::core::NodeEvent

Implements dtn::core::EventReceiver.

Definition at line 567 of file DHTNameService.cpp.

References dtn::core::NodeEvent::getAction(), dtn::core::Node::getEID(), dtn::core::NodeEvent::getNode(), dtn::core::BundleCore::local, dtn::core::NODE_AVAILABLE, dtn::core::NODE_UNAVAILABLE, and dtn::data::EID::sameHost().

Here is the call graph for this function:


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