#include <source/ariba/overlay/modules/OverlayInterface.h>
Inherits ariba::CommunicationListener.
Inherited by ariba::overlay::Chord, and ariba::overlay::OneHop.
Public Types | |
typedef vector< NodeID > | NodeList |
Public Member Functions | |
OverlayInterface (BaseOverlay &_baseoverlay, const NodeID &_nodeid, OverlayStructureEvents *_eventsReceiver, OverlayParameterSet _parameters) | |
virtual | ~OverlayInterface () |
virtual void | createOverlay ()=0 |
virtual void | deleteOverlay ()=0 |
virtual void | joinOverlay (const EndpointDescriptor &bootstrap=EndpointDescriptor::UNSPECIFIED())=0 |
virtual void | leaveOverlay ()=0 |
virtual const EndpointDescriptor & | resolveNode (const NodeID &node)=0 |
virtual NodeList | getKnownNodes (bool deep=true) const =0 |
virtual const LinkID & | getNextLinkId (const NodeID &id) const =0 |
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 | onLinkQoSChanged (const LinkID &lnk, const NodeID &remote, const LinkProperties &prop) |
virtual bool | onLinkRequest (const NodeID &remote, const DataMessage &msg) |
virtual void | onMessage (const DataMessage &msg, const NodeID &remote, const LinkID &lnk=LinkID::UNSPECIFIED) |
const OverlayParameterSet & | getParameters () const |
Protected Attributes | |
BaseOverlay & | baseoverlay |
Reference to an active base overlay. | |
OverlayParameterSet | parameters |
The parameters of the overlay structure. | |
const NodeID & | nodeid |
The node identifier to use with this overlay. | |
OverlayStructureEvents * | eventsReceiver |
The listener used to inform about overlay structure changes. | |
Static Protected Attributes | |
static ServiceID | OVERLAY_SERVICE_ID |
The service identifer of this overlay. | |
Friends | |
class | BaseOverlay |
Definition at line 64 of file OverlayInterface.h.
typedef vector<NodeID> ariba::overlay::OverlayInterface::NodeList |
A node list
Definition at line 71 of file OverlayInterface.h.
ariba::overlay::OverlayInterface::OverlayInterface | ( | BaseOverlay & | _baseoverlay, | |
const NodeID & | _nodeid, | |||
OverlayStructureEvents * | _eventsReceiver, | |||
OverlayParameterSet | _parameters | |||
) |
Constructs a new overlay.
Definition at line 48 of file OverlayInterface.cpp.
References ariba::overlay::BaseOverlay::bind(), and OVERLAY_SERVICE_ID.
ariba::overlay::OverlayInterface::~OverlayInterface | ( | ) | [virtual] |
Destrcuts the overlay.
Definition at line 56 of file OverlayInterface.cpp.
References baseoverlay, OVERLAY_SERVICE_ID, and ariba::overlay::BaseOverlay::unbind().
virtual void ariba::overlay::OverlayInterface::createOverlay | ( | ) | [pure virtual] |
Creates the overlay.
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::handleJoinReply().
virtual void ariba::overlay::OverlayInterface::deleteOverlay | ( | ) | [pure virtual] |
Destroys the overlay.
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
virtual NodeList ariba::overlay::OverlayInterface::getKnownNodes | ( | bool | deep = true |
) | const [pure virtual] |
Returns the nodes known to this overlay.
Usually this are the direct neighbors in the overlay structure. For instance, Chord would return his predecessor, successor and finger nodes. On the other hand OneHop would likely return all participating nodes in the overlay.
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::broadcastMessage(), and ariba::overlay::BaseOverlay::getOverlayNeighbors().
virtual const LinkID& ariba::overlay::OverlayInterface::getNextLinkId | ( | const NodeID & | id | ) | const [pure virtual] |
Returns the link id of the next hop a route message would take.
id | The destination node id |
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::send().
const OverlayParameterSet & ariba::overlay::OverlayInterface::getParameters | ( | ) | const |
Definition at line 85 of file OverlayInterface.cpp.
References parameters.
Referenced by ariba::overlay::BaseOverlay::handleJoinRequest().
virtual void ariba::overlay::OverlayInterface::joinOverlay | ( | const EndpointDescriptor & | bootstrap = EndpointDescriptor::UNSPECIFIED() |
) | [pure virtual] |
Joins the overlay. Starts integration and stabilization of the overlay Node.
bootstrap | The bootstrap end-point descriptor or the default end-point, if this node is the initiator |
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::handleJoinReply(), and ariba::overlay::BaseOverlay::joinSpoVNet().
virtual void ariba::overlay::OverlayInterface::leaveOverlay | ( | ) | [pure virtual] |
Leaves the overlay gracefully.
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::leaveSpoVNet().
void ariba::overlay::OverlayInterface::onLinkChanged | ( | const LinkID & | lnk, | |
const NodeID & | remote | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Definition at line 66 of file OverlayInterface.cpp.
void ariba::overlay::OverlayInterface::onLinkDown | ( | const LinkID & | lnk, | |
const NodeID & | remote | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Reimplemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Definition at line 63 of file OverlayInterface.cpp.
void ariba::overlay::OverlayInterface::onLinkFail | ( | const LinkID & | lnk, | |
const NodeID & | remote | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Definition at line 69 of file OverlayInterface.cpp.
void ariba::overlay::OverlayInterface::onLinkQoSChanged | ( | const LinkID & | lnk, | |
const NodeID & | remote, | |||
const LinkProperties & | prop | |||
) | [virtual] |
bool ariba::overlay::OverlayInterface::onLinkRequest | ( | const NodeID & | remote, | |
const DataMessage & | msg | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Definition at line 76 of file OverlayInterface.cpp.
void ariba::overlay::OverlayInterface::onLinkUp | ( | const LinkID & | lnk, | |
const NodeID & | remote | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Reimplemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Definition at line 60 of file OverlayInterface.cpp.
void ariba::overlay::OverlayInterface::onMessage | ( | const DataMessage & | msg, | |
const NodeID & | remote, | |||
const LinkID & | lnk = LinkID::UNSPECIFIED | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Reimplemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Definition at line 81 of file OverlayInterface.cpp.
Referenced by ariba::overlay::BaseOverlay::handleMessage().
virtual const EndpointDescriptor& ariba::overlay::OverlayInterface::resolveNode | ( | const NodeID & | node | ) | [pure virtual] |
Resolves a overlay neighbor.
node | The node to resolve |
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::getEndpointDescriptor().
friend class BaseOverlay [friend] |
Definition at line 65 of file OverlayInterface.h.
BaseOverlay& ariba::overlay::OverlayInterface::baseoverlay [protected] |
Reference to an active base overlay.
Definition at line 167 of file OverlayInterface.h.
Referenced by ariba::overlay::Chord::discover_neighbors(), ariba::overlay::OneHop::eventFunction(), ariba::overlay::Chord::eventFunction(), ariba::overlay::OneHop::joinOverlay(), ariba::overlay::OneHop::leaveOverlay(), ariba::overlay::OneHop::onLinkUp(), ariba::overlay::Chord::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), ariba::overlay::OneHop::resolveNode(), ariba::overlay::Chord::resolveNode(), ariba::overlay::OneHop::routeMessage(), ariba::overlay::Chord::send(), ariba::overlay::Chord::send_discovery_to(), ariba::overlay::Chord::setup(), and ~OverlayInterface().
The listener used to inform about overlay structure changes.
Definition at line 176 of file OverlayInterface.h.
Referenced by ariba::overlay::OneHop::onMessage().
const NodeID& ariba::overlay::OverlayInterface::nodeid [protected] |
The node identifier to use with this overlay.
Definition at line 173 of file OverlayInterface.h.
Referenced by ariba::overlay::Chord::eventFunction(), ariba::overlay::Chord::getNextLinkId(), ariba::overlay::OneHop::leaveOverlay(), ariba::overlay::Chord::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), ariba::overlay::OneHop::routeMessage(), ariba::overlay::Chord::send_discovery_to(), and ariba::overlay::Chord::showLinks().
ServiceID ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID [static, protected] |
The service identifer of this overlay.
Definition at line 179 of file OverlayInterface.h.
Referenced by ariba::overlay::BaseOverlay::getLinkHTMLInfo(), ariba::overlay::BaseOverlay::handleJoinRequest(), ariba::overlay::OneHop::joinOverlay(), ariba::overlay::BaseOverlay::leaveSpoVNet(), ariba::overlay::BaseOverlay::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), OverlayInterface(), ariba::overlay::Chord::setup(), ariba::overlay::BaseOverlay::stabilizeLinks(), and ~OverlayInterface().
The parameters of the overlay structure.
Definition at line 170 of file OverlayInterface.h.
Referenced by getParameters().