ariba::CommunicationListener Class Reference

#include <source/ariba/CommunicationListener.h>

Inherited by ariba::application::dhttest::DHTTest, ariba::application::pingpong::PingPong, and ariba::overlay::OverlayInterface.

Collaboration diagram for ariba::CommunicationListener:
Collaboration graph
[legend]

List of all members.

Static Public Attributes

static CommunicationListener DEFAULT

Protected Member Functions

 CommunicationListener ()
virtual ~CommunicationListener ()
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 bool onLinkRequest (const NodeID &remote)
virtual void onMessage (const DataMessage &msg, const NodeID &remote, const LinkID &lnk=LinkID::UNSPECIFIED)
virtual void onKeyValue (const Data &key, const vector< Data > &value)

Friends

class ariba::overlay::BaseOverlay
class Node

Detailed Description

Listener for communication events on links.

Definition at line 57 of file CommunicationListener.h.


Constructor & Destructor Documentation

ariba::CommunicationListener::CommunicationListener (  )  [protected]

Construct a communication listener

Definition at line 45 of file CommunicationListener.cpp.

ariba::CommunicationListener::~CommunicationListener (  )  [protected, virtual]

Destruct a communication listener

Definition at line 48 of file CommunicationListener.cpp.


Member Function Documentation

void ariba::CommunicationListener::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 in ariba::application::dhttest::DHTTest.

Definition at line 71 of file CommunicationListener.cpp.

void ariba::CommunicationListener::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 in ariba::overlay::OverlayInterface, ariba::application::pingpong::PingPong, and ariba::application::dhttest::DHTTest.

Definition at line 57 of file CommunicationListener.cpp.

Referenced by ariba::overlay::BaseOverlay::onLinkChanged().

void ariba::CommunicationListener::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 in ariba::overlay::Chord, ariba::overlay::OneHop, ariba::overlay::OverlayInterface, ariba::application::pingpong::PingPong, and ariba::application::dhttest::DHTTest.

Definition at line 54 of file CommunicationListener.cpp.

Referenced by ariba::overlay::BaseOverlay::onLinkDown().

void ariba::CommunicationListener::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 in ariba::overlay::OverlayInterface, ariba::application::pingpong::PingPong, and ariba::application::dhttest::DHTTest.

Definition at line 60 of file CommunicationListener.cpp.

Referenced by ariba::overlay::BaseOverlay::onLinkFail().

bool ariba::CommunicationListener::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 in ariba::application::pingpong::PingPong, and ariba::application::dhttest::DHTTest.

Definition at line 63 of file CommunicationListener.cpp.

Referenced by ariba::overlay::BaseOverlay::handleLinkUpdate().

void ariba::CommunicationListener::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 in ariba::overlay::Chord, ariba::overlay::OneHop, ariba::overlay::OverlayInterface, ariba::application::pingpong::PingPong, and ariba::application::dhttest::DHTTest.

Definition at line 51 of file CommunicationListener.cpp.

Referenced by ariba::overlay::BaseOverlay::handleLinkReply(), and ariba::overlay::BaseOverlay::handleLinkUpdate().

void ariba::CommunicationListener::onMessage ( const DataMessage msg,
const NodeID remote,
const LinkID lnk = LinkID::UNSPECIFIED 
) [protected, virtual]

Called when a message is incoming

Parameters:
msg The data message that is received
remote The remote node that sent the message
lnk The link id of the link where the message is received

Reimplemented in ariba::overlay::Chord, ariba::overlay::OneHop, ariba::overlay::OverlayInterface, and ariba::application::pingpong::PingPong.

Definition at line 67 of file CommunicationListener.cpp.


Friends And Related Function Documentation

friend class ariba::overlay::BaseOverlay [friend]

Definition at line 59 of file CommunicationListener.h.

friend class Node [friend]

Member Data Documentation


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