ariba::application::dhttest::DHTTest Class Reference

#include <sample/testdht/DHTTest.h>

Inherits ariba::NodeListener, ariba::CommunicationListener, ariba::utility::StartupInterface, and ariba::utility::Timer.

Collaboration diagram for ariba::application::dhttest::DHTTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DHTTest ()
virtual ~DHTTest ()

Protected Member Functions

virtual bool onLinkRequest (const NodeID &remote)
virtual void onLinkUp (const LinkID &lnk, const NodeID &remote)
virtual void onLinkDown (const LinkID &lnk, const NodeID &remote)
virtual void onLinkChanged (const LinkID &lnk, const NodeID &remote)
virtual void onLinkFail (const LinkID &lnk, const NodeID &remote)
virtual void onKeyValue (const Data &key, const vector< Data > &value)
virtual void onJoinCompleted (const SpoVNetID &vid)
virtual void onJoinFailed (const SpoVNetID &vid)
virtual void onLeaveCompleted (const SpoVNetID &vid)
virtual void onLeaveFailed (const SpoVNetID &vid)
virtual void startup ()
virtual void shutdown ()
virtual void eventFunction ()
Data stod (string s)
string dtos (Data d)

Private Member Functions

 use_logging_h (DHTTest)

Private Attributes

AribaModuleariba
Nodenode
string name
string key
string data
int counter

Static Private Attributes

static ServiceID DHTTEST_SERVICEID = ServiceID( 111 )

Detailed Description

Definition at line 23 of file DHTTest.h.


Constructor & Destructor Documentation

ariba::application::dhttest::DHTTest::DHTTest (  ) 

Definition at line 18 of file DHTTest.cpp.

References ariba::utility::Timer::setInterval().

ariba::application::dhttest::DHTTest::~DHTTest (  )  [virtual]

Definition at line 23 of file DHTTest.cpp.


Member Function Documentation

string ariba::application::dhttest::DHTTest::dtos ( Data  d  )  [protected]

Definition at line 206 of file DHTTest.cpp.

References DataTpl< T, DataModel >::getBuffer(), and DataTpl< T, DataModel >::getLength().

Referenced by onKeyValue().

void ariba::application::dhttest::DHTTest::eventFunction (  )  [protected, virtual]

Reimplemented from ariba::utility::Timer.

Definition at line 121 of file DHTTest.cpp.

References counter, data, DHTTEST_SERVICEID, ariba::Node::get(), key, logging_info, node, ariba::Node::put(), and stod().

void ariba::application::dhttest::DHTTest::onJoinCompleted ( const SpoVNetID vid  )  [protected, virtual]

This event method is called, when a node has completed its join procedure.

Parameters:
vid The spovnet id
nid The node id

Reimplemented from ariba::NodeListener.

Definition at line 140 of file DHTTest.cpp.

References counter, key, logging_info, ariba::utility::Timer::start(), and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onJoinFailed ( const SpoVNetID vid  )  [protected, virtual]

This event method is called, when a node failed to join a spovnet.

Parameters:
vid The spovnet id
nid The node id

Reimplemented from ariba::NodeListener.

Definition at line 153 of file DHTTest.cpp.

References logging_error, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onKeyValue ( const Data key,
const vector< Data > &  value 
) [protected, virtual]

Called when a key has been resolved in the DHT

Parameters:
key The key that was requested
value the data items the key was resolved to

Reimplemented from ariba::CommunicationListener.

Definition at line 191 of file DHTTest.cpp.

References dtos(), and logging_info.

void ariba::application::dhttest::DHTTest::onLeaveCompleted ( const SpoVNetID vid  )  [protected, virtual]

This event method is called, when a node succeeded to leave a spovnet.

Parameters:
vid The spovnet id
nid The node id

Reimplemented from ariba::NodeListener.

Definition at line 157 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onLeaveFailed ( const SpoVNetID vid  )  [protected, virtual]

This event method is called, when a node failed to leave a spovnet.

Parameters:
vid The spovnet id
nid The node id

Reimplemented from ariba::NodeListener.

Definition at line 161 of file DHTTest.cpp.

References logging_error, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onLinkChanged ( const LinkID lnk,
const NodeID remote 
) [protected, virtual]

Event called when a link has changed, e.g. through mobility

Parameters:
lnk The id of the link
remote The remote node where the link ends

Reimplemented from ariba::CommunicationListener.

Definition at line 181 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onLinkDown ( const LinkID lnk,
const NodeID remote 
) [protected, virtual]

Event called when a link goes down

Parameters:
lnk The id of the link
remote The remote node where the link ends

Reimplemented from ariba::CommunicationListener.

Definition at line 176 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onLinkFail ( const LinkID lnk,
const NodeID remote 
) [protected, virtual]

Event called when a link has failed

Parameters:
lnk The id of the link
remote The remote node where the link ends

Reimplemented from ariba::CommunicationListener.

Definition at line 186 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

bool ariba::application::dhttest::DHTTest::onLinkRequest ( const NodeID remote  )  [protected, virtual]

Request from remote node to open up a link

Parameters:
remote The remote node that requests the new link

Reimplemented from ariba::CommunicationListener.

Definition at line 166 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::onLinkUp ( const LinkID lnk,
const NodeID remote 
) [protected, virtual]

Event called when a link goes up

Parameters:
lnk The id of the link
remote The remote node where the link ends

Reimplemented from ariba::CommunicationListener.

Definition at line 171 of file DHTTest.cpp.

References logging_info, and ariba::utility::Identifier::toString().

void ariba::application::dhttest::DHTTest::shutdown (  )  [protected, virtual]
void ariba::application::dhttest::DHTTest::startup (  )  [protected, virtual]
Data ariba::application::dhttest::DHTTest::stod ( string  s  )  [protected]

Definition at line 202 of file DHTTest.cpp.

Referenced by eventFunction().

ariba::application::dhttest::DHTTest::use_logging_h ( DHTTest   )  [private]

Reimplemented from ariba::utility::Timer.


Member Data Documentation

Definition at line 64 of file DHTTest.h.

Referenced by shutdown(), and startup().

Definition at line 71 of file DHTTest.h.

Referenced by eventFunction(), and onJoinCompleted().

Definition at line 70 of file DHTTest.h.

Referenced by eventFunction(), and startup().

Definition at line 74 of file DHTTest.h.

Referenced by eventFunction(), and startup().

Definition at line 69 of file DHTTest.h.

Referenced by eventFunction(), onJoinCompleted(), and startup().

Definition at line 66 of file DHTTest.h.

Referenced by startup().

Definition at line 65 of file DHTTest.h.

Referenced by eventFunction(), shutdown(), and startup().


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

Generated on Fri Dec 10 11:09:24 2010 for Ariba by  doxygen 1.6.1