ariba::SideportListener Class Reference

#include <source/ariba/SideportListener.h>

Collaboration diagram for ariba::SideportListener:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Protocol { undefined = 0x0, rfcomm = 0x1, ipv4 = 0x2, ipv6 = 0x3 }

Public Member Functions

 SideportListener ()
virtual ~SideportListener ()
string getEndpointDescription (const LinkID &link) const
string getEndpointDescription (const NodeID &node=NodeID::UNSPECIFIED) const
const NodeIDgetNodeID (const LinkID &link=LinkID::UNSPECIFIED) const
vector< LinkIDgetLinkIDs (const NodeID &node=NodeID::UNSPECIFIED) const
string getHtmlLinks ()
vector< NodeIDgetOverlayNeighbors (bool deep=true)
bool isRelayingNode (const NodeID &node)
bool isRelayedNode (const NodeID &node)
Protocol getReachabilityProtocol (const NodeID &node)

Static Public Attributes

static SideportListener DEFAULT

Protected Member Functions

virtual void onLinkUp (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet)
virtual void onLinkDown (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet)
virtual void onLinkChanged (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet)
virtual void onLinkFail (const LinkID &lnk, const NodeID &local, const NodeID &remote, const SpoVNetID &spovnet)

Private Member Functions

void configure (overlay::BaseOverlay *_overlay)

Private Attributes

overlay::BaseOverlayoverlay

Friends

class Node
class AribaModule
class overlay::BaseOverlay


Detailed Description

A sideport class to gather advanced information about nodes, links, their endpoints and get information about all link activity on a node.

Author:
Christoph Mayer <mayer@tm.uka.de>

Definition at line 68 of file SideportListener.h.


Member Enumeration Documentation

Protocols for some layer, can be combined

Enumerator:
undefined 
rfcomm 
ipv4 
ipv6 

Definition at line 170 of file SideportListener.h.


Constructor & Destructor Documentation

ariba::SideportListener::SideportListener (  ) 

Constructor of the SideportListener.

Definition at line 51 of file SideportListener.cpp.

ariba::SideportListener::~SideportListener (  )  [virtual]

Virtual Desctructor for the SideportListener.

Definition at line 54 of file SideportListener.cpp.


Member Function Documentation

void ariba::SideportListener::configure ( overlay::BaseOverlay _overlay  )  [private]

Configure the sideport with the correct base overlay.

Parameters:
_overlay The BaseOverlay where to attach the sideport.

Definition at line 163 of file SideportListener.cpp.

References overlay.

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

string ariba::SideportListener::getEndpointDescription ( const NodeID node = NodeID::UNSPECIFIED  )  const

Get a descriprive string that identifiers the remote node.

Parameters:
node The node id to query endpoint information.
Returns:
A descriptive endpoint information.

Definition at line 62 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getEndpointDescriptor(), overlay, and ariba::communication::EndpointDescriptor::toString().

string ariba::SideportListener::getEndpointDescription ( const LinkID link  )  const

Get a descriptive string that identifies the remote endpoint for the given link.

Parameters:
link The link to query endpoint information for.
Returns:
A descriptive endpoint information.

Definition at line 57 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getEndpointDescriptor(), overlay, and ariba::communication::EndpointDescriptor::toString().

string ariba::SideportListener::getHtmlLinks (  ) 

Get html presentation of the links.

Returns:
html of links

Definition at line 77 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getLinkHTMLInfo(), and overlay.

vector< LinkID > ariba::SideportListener::getLinkIDs ( const NodeID node = NodeID::UNSPECIFIED  )  const

Get all links that end at the specified node id. Or all links from the local node when the node id is set to unspecified.

Parameters:
node The remote node to query all links or unspecified for all local starting links
Returns:
A vector of link ids.

Definition at line 72 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getLinkIDs(), and overlay.

const NodeID & ariba::SideportListener::getNodeID ( const LinkID link = LinkID::UNSPECIFIED  )  const

Get the remote endpoint node id for the given string, or the local nodeid for an unspecified link.

Parameters:
link The link to get the remote node.
Returns:
The nodeid of the remote end of the link or the local nodeid for an unspecified link.

Definition at line 67 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getNodeID(), overlay, and ariba::utility::NodeID::UNSPECIFIED.

vector< NodeID > ariba::SideportListener::getOverlayNeighbors ( bool  deep = true  ) 

Get the neighbots in the overlay structure

Returns:
A vector of NodeIDs of the neighbors

Definition at line 81 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::getOverlayNeighbors(), and overlay.

SideportListener::Protocol ariba::SideportListener::getReachabilityProtocol ( const NodeID node  ) 

bool ariba::SideportListener::isRelayedNode ( const NodeID node  ) 

Is this node only reachable for us through a relay?

Parameters:
node The node in question
Returns:
true, if we reach this node only over a relay

Definition at line 89 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::links, overlay, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, and ariba::overlay::LinkDescriptor::up.

bool ariba::SideportListener::isRelayingNode ( const NodeID node  ) 

Is this node acting as a relay for us

Parameters:
node The node in question
Returns:
true, if this node is relaying for us

Definition at line 109 of file SideportListener.cpp.

References ariba::overlay::BaseOverlay::links, overlay, and ariba::overlay::LinkDescriptor::routeRecord.

void ariba::SideportListener::onLinkChanged ( const LinkID lnk,
const NodeID local,
const NodeID remote,
const SpoVNetID spovnet 
) [protected, virtual]

Notification function when a link has changed

Parameters:
lnk The corresponding link id.
local The local node id.
remote The remote node id.
spovnet The SpoVNet ID.

Definition at line 173 of file SideportListener.cpp.

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

void ariba::SideportListener::onLinkDown ( const LinkID lnk,
const NodeID local,
const NodeID remote,
const SpoVNetID spovnet 
) [protected, virtual]

Notification function when a link has gone down.

Parameters:
lnk The corresponding link id.
local The local node id.
remote The remote node id.
spovnet The SpoVNet ID.

Definition at line 170 of file SideportListener.cpp.

Referenced by ariba::overlay::BaseOverlay::dropLink(), and ariba::overlay::BaseOverlay::onLinkDown().

void ariba::SideportListener::onLinkFail ( const LinkID lnk,
const NodeID local,
const NodeID remote,
const SpoVNetID spovnet 
) [protected, virtual]

Notification function when a link has failed

Parameters:
lnk The corresponding link id.
local The local node id.
remote The remote node id.
spovnet The SpoVNet ID.

Definition at line 176 of file SideportListener.cpp.

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

void ariba::SideportListener::onLinkUp ( const LinkID lnk,
const NodeID local,
const NodeID remote,
const SpoVNetID spovnet 
) [protected, virtual]

Notification function when a link has gone up.

Parameters:
lnk The corresponding link id.
local The local node id.
remote The remote node id.
spovnet The SpoVNet ID.

Definition at line 167 of file SideportListener.cpp.

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


Friends And Related Function Documentation

friend class AribaModule [friend]

Definition at line 71 of file SideportListener.h.

friend class Node [friend]

Definition at line 70 of file SideportListener.h.

friend class overlay::BaseOverlay [friend]

Definition at line 72 of file SideportListener.h.


Member Data Documentation

A default object of the SideportListener that has empty event functions and will return invalid information.

Definition at line 80 of file SideportListener.h.

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

The configured BaseOverlay where the sideport is attached to.

Definition at line 262 of file SideportListener.h.

Referenced by configure(), getEndpointDescription(), getHtmlLinks(), getLinkIDs(), getNodeID(), getOverlayNeighbors(), getReachabilityProtocol(), isRelayedNode(), and isRelayingNode().


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

Generated on Fri Aug 14 23:39:13 2009 for Ariba by  doxygen 1.5.8