#include <source/ariba/overlay/modules/OverlayInterface.h>
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 void | routeMessage (const NodeID &destnode, Message *msg)=0 |
virtual NodeList | getKnownNodes () 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.
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.
virtual void ariba::overlay::OverlayInterface::deleteOverlay | ( | ) | [pure virtual] |
Destroys the overlay.
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
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.
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().
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().
virtual void ariba::overlay::OverlayInterface::routeMessage | ( | const NodeID & | destnode, | |
Message * | msg | |||
) | [pure virtual] |
Routes a message to a given node by using overlay routing.
destnode | The destination node. | |
msg | The message to be routed. |
Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.
Referenced by ariba::overlay::BaseOverlay::establishLink(), and ariba::overlay::BaseOverlay::receiveMessage().
virtual NodeList ariba::overlay::OverlayInterface::getKnownNodes | ( | ) | 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().
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::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::onLinkChanged | ( | const LinkID & | lnk, | |
const NodeID & | remote | |||
) | [virtual] |
Reimplemented from ariba::CommunicationListener.
Definition at line 66 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::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.
const OverlayParameterSet & ariba::overlay::OverlayInterface::getParameters | ( | ) | const |
Definition at line 85 of file OverlayInterface.cpp.
References parameters.
Referenced by ariba::overlay::BaseOverlay::receiveMessage().
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 166 of file OverlayInterface.h.
Referenced by ariba::overlay::OneHop::eventFunction(), ariba::overlay::Chord::eventFunction(), ariba::overlay::OneHop::joinOverlay(), ariba::overlay::OneHop::leaveOverlay(), ariba::overlay::OneHop::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), ariba::overlay::OneHop::resolveNode(), ariba::overlay::Chord::resolveNode(), ariba::overlay::OneHop::routeMessage(), ariba::overlay::Chord::routeMessage(), ariba::overlay::Chord::send(), ariba::overlay::Chord::send_discovery_to(), ariba::overlay::Chord::setup(), and ~OverlayInterface().
The parameters of the overlay structure.
Definition at line 169 of file OverlayInterface.h.
Referenced by getParameters().
const NodeID& ariba::overlay::OverlayInterface::nodeid [protected] |
The node identifier to use with this overlay.
Definition at line 172 of file OverlayInterface.h.
Referenced by ariba::overlay::Chord::eventFunction(), ariba::overlay::OneHop::leaveOverlay(), ariba::overlay::Chord::leaveOverlay(), ariba::overlay::Chord::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), ariba::overlay::Chord::routeMessage(), and ariba::overlay::Chord::send_discovery_to().
The listener used to inform about overlay structure changes.
Definition at line 175 of file OverlayInterface.h.
Referenced by ariba::overlay::OneHop::onMessage().
ServiceID ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID [static, protected] |
The service identifer of this overlay.
Definition at line 178 of file OverlayInterface.h.
Referenced by ariba::overlay::OneHop::joinOverlay(), ariba::overlay::BaseOverlay::leaveSpoVNet(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::setup(), and ~OverlayInterface().