#include <source/ariba/SideportListener.h>
Public Member Functions | |
SideportListener () | |
virtual | ~SideportListener () |
string | getEndpointDescription (const LinkID &link) const |
string | getEndpointDescription (const NodeID &node=NodeID::UNSPECIFIED) const |
const NodeID & | getNodeID (const LinkID &link=LinkID::UNSPECIFIED) const |
vector< LinkID > | getLinkIDs (const NodeID &node=NodeID::UNSPECIFIED) const |
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::BaseOverlay * | overlay |
Friends | |
class | Node |
class | AribaModule |
class | overlay::BaseOverlay |
Definition at line 63 of file SideportListener.h.
ariba::SideportListener::SideportListener | ( | ) |
Constructor of the SideportListener.
Definition at line 47 of file SideportListener.cpp.
ariba::SideportListener::~SideportListener | ( | ) | [virtual] |
Virtual Desctructor for the SideportListener.
Definition at line 50 of file SideportListener.cpp.
string ariba::SideportListener::getEndpointDescription | ( | const LinkID & | link | ) | const |
Get a descriptive string that identifies the remote endpoint for the given link.
link | The link to query endpoint information for. |
Definition at line 53 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getEndpointDescriptor(), and overlay.
string ariba::SideportListener::getEndpointDescription | ( | const NodeID & | node = NodeID::UNSPECIFIED |
) | const |
Get a descriprive string that identifiers the remote node.
node | The node id to query endpoint information. |
Definition at line 58 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getEndpointDescriptor(), 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.
link | The link to get the remote node. |
Definition at line 63 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getNodeID(), overlay, and ariba::utility::NodeID::UNSPECIFIED.
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.
The | remote node to query all links or unspecified for all local starting links |
Definition at line 68 of file SideportListener.cpp.
References ariba::overlay::BaseOverlay::getLinkIDs(), and overlay.
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.
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 77 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::receiveMessage().
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.
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 80 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::dropLink(), and ariba::overlay::BaseOverlay::onLinkDown().
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
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 83 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::onLinkChanged().
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
lnk | The corresponding link id. | |
local | The local node id. | |
remote | The remote node id. | |
spovnet | The SpoVNet ID. |
Definition at line 86 of file SideportListener.cpp.
Referenced by ariba::overlay::BaseOverlay::onLinkFail().
void ariba::SideportListener::configure | ( | overlay::BaseOverlay * | _overlay | ) | [private] |
Configure the sideport with the correct base overlay.
_overlay | The BaseOverlay where to attach the sideport. |
Definition at line 73 of file SideportListener.cpp.
References overlay.
Referenced by ariba::overlay::BaseOverlay::registerSidePort().
friend class Node [friend] |
Definition at line 65 of file SideportListener.h.
friend class AribaModule [friend] |
Definition at line 66 of file SideportListener.h.
friend class overlay::BaseOverlay [friend] |
Definition at line 67 of file SideportListener.h.
A default object of the SideportListener that has empty event functions and will return invalid information.
Definition at line 75 of file SideportListener.h.
Referenced by ariba::overlay::BaseOverlay::unregisterSidePort().
The configured BaseOverlay where the sideport is attached to.
Definition at line 210 of file SideportListener.h.
Referenced by configure(), getEndpointDescription(), getLinkIDs(), and getNodeID().