ariba::overlay::OverlayInterface Class Reference

#include <source/ariba/overlay/modules/OverlayInterface.h>

Inherits ariba::CommunicationListener.

Inherited by ariba::overlay::Chord, and ariba::overlay::OneHop.

Collaboration diagram for ariba::overlay::OverlayInterface:

Collaboration graph
[legend]

List of all members.

Public Types

typedef vector< NodeIDNodeList

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 EndpointDescriptorresolveNode (const NodeID &node)=0
virtual NodeList getKnownNodes (bool deep=true) const =0
virtual const LinkIDgetNextLinkId (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 OverlayParameterSetgetParameters () const

Protected Attributes

BaseOverlaybaseoverlay
 Reference to an active base overlay.
OverlayParameterSet parameters
 The parameters of the overlay structure.
const NodeIDnodeid
 The node identifier to use with this overlay.
OverlayStructureEventseventsReceiver
 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


Detailed Description

This class declares an interface for an structured overlay.

Definition at line 64 of file OverlayInterface.h.


Member Typedef Documentation

A node list

Definition at line 71 of file OverlayInterface.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

virtual void ariba::overlay::OverlayInterface::createOverlay (  )  [pure virtual]

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.

Returns:
The list of all known nodes

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.

Parameters:
id The destination node id
Returns:
The link id of the next hop

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.

Parameters:
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]

See also:
CommunicationListener

Reimplemented from ariba::CommunicationListener.

Definition at line 66 of file OverlayInterface.cpp.

void ariba::overlay::OverlayInterface::onLinkDown ( const LinkID lnk,
const NodeID remote 
) [virtual]

See also:
CommunicationListener

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]

See also:
CommunicationListener

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]

See also:
CommunicationListener

Definition at line 72 of file OverlayInterface.cpp.

bool ariba::overlay::OverlayInterface::onLinkRequest ( const NodeID remote,
const DataMessage msg 
) [virtual]

See also:
CommunicationListener

Reimplemented from ariba::CommunicationListener.

Definition at line 76 of file OverlayInterface.cpp.

void ariba::overlay::OverlayInterface::onLinkUp ( const LinkID lnk,
const NodeID remote 
) [virtual]

See also:
CommunicationListener

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]

virtual const EndpointDescriptor& ariba::overlay::OverlayInterface::resolveNode ( const NodeID node  )  [pure virtual]

Resolves a overlay neighbor.

Parameters:
node The node to resolve
Returns:
Endpoint descriptor of local neighbor or UNSPECIFIED

Implemented in ariba::overlay::Chord, and ariba::overlay::OneHop.

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


Friends And Related Function Documentation

friend class BaseOverlay [friend]

Definition at line 65 of file OverlayInterface.h.


Member Data Documentation

The listener used to inform about overlay structure changes.

Definition at line 176 of file OverlayInterface.h.

Referenced by ariba::overlay::OneHop::onMessage().

The parameters of the overlay structure.

Definition at line 170 of file OverlayInterface.h.

Referenced by getParameters().


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

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