#include <source/ariba/overlay/BaseOverlay.h>
Inherits ariba::utility::MessageReceiver, ariba::communication::CommunicationEvents, ariba::overlay::OverlayStructureEvents, and ariba::utility::Timer.
Classes | |
class | relay_route |
relay route definitions More... | |
Public Member Functions | |
BaseOverlay () | |
virtual | ~BaseOverlay () |
void | start (BaseCommunication &_basecomm, const NodeID &_nodeid) |
void | stop () |
bool | isStarted () |
const LinkID | establishLink (const EndpointDescriptor &ep, const NodeID &node, const ServiceID &service) |
Tries to establish a direct or overlay link. | |
const LinkID | establishLink (const NodeID &remote, const ServiceID &service=OverlayInterface::OVERLAY_SERVICE_ID) |
establishes a link between two arbitrary nodes | |
const LinkID | establishDirectLink (const EndpointDescriptor &endpoint, const ServiceID &service=OverlayInterface::OVERLAY_SERVICE_ID) |
call base communication's establish link and add link mapping | |
void | dropLink (const LinkID &link) |
drops a link | |
seqnum_t | sendMessage (const Message *message, const LinkID &link) |
sends a message over an existing link | |
seqnum_t | sendMessage (const Message *message, const NodeID &remote, const ServiceID &service=OverlayInterface::OVERLAY_SERVICE_ID) |
sends a message to a node and a specific service | |
void | broadcastMessage (Message *message, const ServiceID &service) |
const EndpointDescriptor & | getEndpointDescriptor (const LinkID &link=LinkID::UNSPECIFIED) const |
vector< NodeID > | getOverlayNeighbors (bool deep=true) const |
return the overlay neighbors | |
const EndpointDescriptor & | getEndpointDescriptor (const NodeID &node) const |
bool | bind (CommunicationListener *listener, const ServiceID &sid) |
bool | unbind (CommunicationListener *listener, const ServiceID &sid) |
bool | bind (NodeListener *listener) |
bool | unbind (NodeListener *listener) |
bool | registerSidePort (SideportListener *_sideport) |
bool | unregisterSidePort (SideportListener *_sideport) |
const NodeID & | getNodeID (const LinkID &lid=LinkID::UNSPECIFIED) const |
vector< LinkID > | getLinkIDs (const NodeID &nid=NodeID::UNSPECIFIED) const |
void | joinSpoVNet (const SpoVNetID &id, const EndpointDescriptor &boot=EndpointDescriptor::UNSPECIFIED()) |
void | createSpoVNet (const SpoVNetID &id, const OverlayParameterSet ¶m=OverlayParameterSet::DEFAULT, const SecurityParameterSet &sec=SecurityParameterSet::DEFAULT, const QoSParameterSet &qos=QoSParameterSet::DEFAULT) |
void | leaveSpoVNet () |
Protected Member Functions | |
virtual void | onLinkUp (const LinkID &id, const address_v *local, const address_v *remote) |
virtual void | onLinkDown (const LinkID &id, const address_v *local, const address_v *remote) |
virtual void | onLinkChanged (const LinkID &id, const address_v *oldlocal, const address_v *newlocal, const address_v *oldremote, const address_v *newremote) |
virtual void | onLinkFail (const LinkID &id, const address_v *local, const address_v *remote) |
virtual void | onLinkQoSChanged (const LinkID &id, const address_v *local, const address_v *remote, const QoSParameterSet &qos) |
virtual bool | onLinkRequest (const LinkID &id, const address_v *local, const address_v *remote) |
virtual bool | receiveMessage (const Message *message, const LinkID &link, const NodeID &) |
handles a message from base communication | |
virtual void | onNodeJoin (const NodeID &node) |
virtual void | eventFunction () |
std::string | getLinkHTMLInfo () |
Private Types | |
enum | _BaseOverlayState { BaseOverlayStateInvalid = 0, BaseOverlayStateCompleted = 1 } |
The state of the BaseOverlay. More... | |
typedef enum ariba::overlay::BaseOverlay::_BaseOverlayState | BaseOverlayState |
The state of the BaseOverlay. | |
typedef vector< NodeListener * > | NodeListenerVector |
the node listeners | |
typedef vector< NodeID > | JoiningNodes |
Private Member Functions | |
use_logging_h (BaseOverlay) | |
CommunicationListener * | getListener (const ServiceID &id) |
bool | handleMessage (const Message *message, LinkDescriptor *ld, const LinkID bcLink=LinkID::UNSPECIFIED) |
demultiplexes a incoming message with link descriptor | |
bool | handleData (OverlayMsg *msg, LinkDescriptor *ld) |
bool | handleSignaling (OverlayMsg *msg, LinkDescriptor *ld) |
bool | handleJoinRequest (OverlayMsg *msg, const LinkID &bcLink) |
Handle spovnet instance join requests. | |
bool | handleJoinReply (OverlayMsg *msg, const LinkID &bcLink) |
Handle replies to spovnet instance join requests. | |
bool | handleLinkRequest (OverlayMsg *msg, LinkDescriptor *ld) |
handle a link request and reply | |
bool | handleLinkReply (OverlayMsg *msg, LinkDescriptor *ld) |
bool | handleLinkUpdate (OverlayMsg *msg, LinkDescriptor *ld) |
bool | handleLinkDirect (OverlayMsg *msg, LinkDescriptor *ld) |
handle a direct link message | |
bool | handleLinkAlive (OverlayMsg *msg, LinkDescriptor *ld) |
handle a keep-alive message for a link | |
void | eraseDescriptor (const LinkID &link, bool communication=false) |
erases a link descriptor | |
LinkDescriptor * | getDescriptor (const LinkID &link, bool communication=false) |
returns a link descriptor for the given id | |
const LinkDescriptor * | getDescriptor (const LinkID &link, bool communication=false) const |
returns a link descriptor for the given id | |
LinkDescriptor * | getAutoDescriptor (const NodeID &node, const ServiceID &service) |
returns a auto-link descriptor for the given node and service id | |
LinkDescriptor * | addDescriptor (const LinkID &link=LinkID::UNSPECIFIED) |
adds a new link descriptor or uses an existing one | |
void | stabilizeLinks () |
stabilizes link information | |
void | showLinks () |
print the currently known links | |
int | compare (const LinkID &lhs, const LinkID &rhs) |
compares two arbitrary links to the same node | |
void | stabilizeRelays () |
stabilize relay information | |
void | refreshRelayInformation (const OverlayMsg *message, LinkDescriptor *ld) |
refreshes relay information | |
LinkDescriptor * | getRelayLinkTo (const NodeID &remote) |
returns a known relay link | |
void | removeRelayLink (const LinkID &link) |
removes relay link information | |
void | removeRelayNode (const NodeID &link) |
removes relay node information | |
void | route (OverlayMsg *message) |
routes a message to its destination node | |
seqnum_t | send (OverlayMsg *message, const NodeID &destination) |
sends a raw message to another node, delivers it to the base overlay class | |
seqnum_t | send (OverlayMsg *message, LinkDescriptor *ld, bool ignore_down=false) |
send a raw message using a link descriptor, delivers it to the base overlay class | |
seqnum_t | send_node (OverlayMsg *message, const NodeID &remote, const ServiceID &service=OverlayInterface::OVERLAY_SERVICE_ID) |
seqnum_t | send_link (OverlayMsg *message, const LinkID &link, bool ignore_down=false) |
Private Attributes | |
bool | started |
is the base overlay started yet | |
BaseOverlayState | state |
Current Base-Overlay state. | |
BaseCommunication * | bc |
reference to the base communication | |
NodeID | nodeId |
the node id of this node | |
SpoVNetID | spovnetId |
the spovnet id of the currently joined overlay | |
vector< LinkID > | bootstrapLinks |
the link id of the link to the initiator node | |
NodeID | spovnetInitiator |
The initiator node. | |
Demultiplexer < CommunicationListener *, ServiceID > | communicationListeners |
the service id communication listeners | |
NodeListenerVector | nodeListeners |
SideportListener * | sideport |
the sideport listener | |
OverlayInterface * | overlayInterface |
the used overlay structure | |
OverlayBootstrap | overlayBootstrap |
Bootstrapper for our spovnet. | |
int | counter |
link state information counter | |
vector< LinkDescriptor * > | links |
The link mapping of the node. | |
vector< relay_route > | relay_routes |
JoiningNodes | joiningNodes |
Friends | |
class | OneHop |
class | Chord |
class | ariba::SideportListener |
Definition at line 125 of file BaseOverlay.h.
typedef enum ariba::overlay::BaseOverlay::_BaseOverlayState ariba::overlay::BaseOverlay::BaseOverlayState [private] |
The state of the BaseOverlay.
typedef vector<NodeID> ariba::overlay::BaseOverlay::JoiningNodes [private] |
nodes with pending joines. TODO: should be cleaned every some seconds, add timestamps to each, and check on occasion
Definition at line 495 of file BaseOverlay.h.
typedef vector<NodeListener*> ariba::overlay::BaseOverlay::NodeListenerVector [private] |
enum ariba::overlay::BaseOverlay::_BaseOverlayState [private] |
ariba::overlay::BaseOverlay::BaseOverlay | ( | ) |
Constructs an empty non-functional base overlay instance
Definition at line 543 of file BaseOverlay.cpp.
ariba::overlay::BaseOverlay::~BaseOverlay | ( | ) | [virtual] |
Destructs a base overlay instance
Definition at line 549 of file BaseOverlay.cpp.
LinkDescriptor * ariba::overlay::BaseOverlay::addDescriptor | ( | const LinkID & | link = LinkID::UNSPECIFIED |
) | [private] |
adds a new link descriptor or uses an existing one
adds a link descriptor
Definition at line 104 of file BaseOverlay.cpp.
References getDescriptor(), ariba::utility::Identifier::isUnspecified(), links, and ariba::overlay::LinkDescriptor::overlayId.
Referenced by establishDirectLink(), establishLink(), handleLinkRequest(), and onLinkUp().
bool ariba::overlay::BaseOverlay::bind | ( | NodeListener * | listener | ) |
Definition at line 969 of file BaseOverlay.cpp.
References logging_debug, logging_warn, and nodeListeners.
bool ariba::overlay::BaseOverlay::bind | ( | CommunicationListener * | listener, | |
const ServiceID & | sid | |||
) |
Definition at line 934 of file BaseOverlay.cpp.
References communicationListeners, logging_debug, logging_error, and ariba::utility::ServiceID::toString().
Referenced by ariba::Node::bind(), and ariba::overlay::OverlayInterface::OverlayInterface().
Send out a message to all nodes that are known in the overlay structure. Depending on the structure of the overlay, this can be very different.
Definition at line 1635 of file BaseOverlay.cpp.
References ariba::overlay::OverlayInterface::getKnownNodes(), logging_debug, nodeId, overlayInterface, sendMessage(), and ariba::utility::ServiceID::toString().
Referenced by ariba::Node::sendBroadcastMessage().
compares two arbitrary links to the same node
Definition at line 256 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteLink, ariba::overlay::LinkDescriptor::remoteNode, and ariba::overlay::LinkDescriptor::up.
void ariba::overlay::BaseOverlay::createSpoVNet | ( | const SpoVNetID & | id, | |
const OverlayParameterSet & | param = OverlayParameterSet::DEFAULT , |
|||
const SecurityParameterSet & | sec = SecurityParameterSet::DEFAULT , |
|||
const QoSParameterSet & | qos = QoSParameterSet::DEFAULT | |||
) |
Initiates a new spontaneous virtual network. This makes this BaseOverlay to the SpoVNet-Initiator.
id | The spovnet identifier |
Definition at line 682 of file BaseOverlay.cpp.
References BaseOverlayStateInvalid, ariba::overlay::OverlayFactory::create(), logging_fatal, logging_info, nodeId, nodeListeners, ariba::NodeListener::onJoinFailed(), overlayInterface, spovnetId, state, and ariba::utility::Identifier::toString().
Referenced by ariba::Node::initiate().
void ariba::overlay::BaseOverlay::dropLink | ( | const LinkID & | link | ) |
drops a link
drops an established link
Definition at line 782 of file BaseOverlay.cpp.
References bc, ariba::communication::BaseCommunication::dropLink(), eraseDescriptor(), getDescriptor(), logging_info, logging_warn, ariba::SideportListener::onLinkDown(), sideport, and ariba::utility::Identifier::toString().
Referenced by ariba::Node::dropLink(), ariba::overlay::Chord::eventFunction(), handleLinkUpdate(), leaveSpoVNet(), ariba::overlay::Chord::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::Chord::onMessage(), and stabilizeLinks().
void ariba::overlay::BaseOverlay::eraseDescriptor | ( | const LinkID & | link, | |
bool | communication = false | |||
) | [private] |
erases a link descriptor
Definition at line 92 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::communicationId, links, and ariba::overlay::LinkDescriptor::overlayId.
Referenced by dropLink(), handleLinkDirect(), and onLinkDown().
const LinkID ariba::overlay::BaseOverlay::establishDirectLink | ( | const EndpointDescriptor & | endpoint, | |
const ServiceID & | service = OverlayInterface::OVERLAY_SERVICE_ID | |||
) |
call base communication's establish link and add link mapping
Starts a link establishment procedure to the specified endpoint and to the specified service
find a service listener
establish link and add mapping
Definition at line 723 of file BaseOverlay.cpp.
References addDescriptor(), bc, ariba::overlay::LinkDescriptor::communicationId, communicationListeners, ariba::communication::BaseCommunication::establishLink(), ariba::overlay::LinkDescriptor::listener, logging_error, logging_info, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::service, ariba::communication::EndpointDescriptor::toString(), ariba::utility::Identifier::toString(), ariba::utility::ServiceID::toString(), and ariba::utility::LinkID::UNSPECIFIED.
Referenced by establishLink(), ariba::overlay::OneHop::joinOverlay(), and ariba::overlay::OneHop::onMessage().
const LinkID ariba::overlay::BaseOverlay::establishLink | ( | const NodeID & | remote, | |
const ServiceID & | service = OverlayInterface::OVERLAY_SERVICE_ID | |||
) |
establishes a link between two arbitrary nodes
Starts a link establishment procedure to the specfied node for the service with id service
node | Destination node id | |
service | Service to connect to | |
linkid | Link identifier to be used with this link |
Definition at line 749 of file BaseOverlay.cpp.
References addDescriptor(), getListener(), ariba::overlay::LinkDescriptor::listener, logging_info, nodeId, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, send_node(), ariba::overlay::LinkDescriptor::service, ariba::overlay::OverlayMsg::setRelayed(), ariba::overlay::OverlayMsg::setSourceLink(), ariba::utility::ServiceID::toString(), ariba::utility::Identifier::toString(), ariba::overlay::OverlayMsg::typeLinkRequest, and ariba::utility::LinkID::UNSPECIFIED.
const LinkID ariba::overlay::BaseOverlay::establishLink | ( | const EndpointDescriptor & | ep, | |
const NodeID & | node, | |||
const ServiceID & | service | |||
) |
Tries to establish a direct or overlay link.
Definition at line 708 of file BaseOverlay.cpp.
References establishDirectLink(), and ariba::utility::Identifier::isUnspecified().
Referenced by ariba::Node::establishLink(), sendMessage(), and ariba::overlay::Chord::setup().
void ariba::overlay::BaseOverlay::eventFunction | ( | ) | [protected, virtual] |
Timer Event method
Reimplemented from ariba::utility::Timer.
Definition at line 1685 of file BaseOverlay.cpp.
References stabilizeLinks(), and stabilizeRelays().
LinkDescriptor * ariba::overlay::BaseOverlay::getAutoDescriptor | ( | const NodeID & | node, | |
const ServiceID & | service | |||
) | [private] |
returns a auto-link descriptor for the given node and service id
returns a auto-link descriptor
Definition at line 115 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::autolink, ariba::overlay::LinkDescriptor::keepAliveMissed, links, ariba::overlay::LinkDescriptor::remoteNode, ariba::overlay::LinkDescriptor::service, and ariba::overlay::LinkDescriptor::up.
Referenced by sendMessage().
const LinkDescriptor * ariba::overlay::BaseOverlay::getDescriptor | ( | const LinkID & | link, | |
bool | communication = false | |||
) | const [private] |
returns a link descriptor for the given id
Definition at line 84 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::communicationId, links, and ariba::overlay::LinkDescriptor::overlayId.
LinkDescriptor * ariba::overlay::BaseOverlay::getDescriptor | ( | const LinkID & | link, | |
bool | communication = false | |||
) | [private] |
returns a link descriptor for the given id
Definition at line 77 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::communicationId, links, and ariba::overlay::LinkDescriptor::overlayId.
Referenced by addDescriptor(), compare(), dropLink(), getEndpointDescriptor(), getNodeID(), getRelayLinkTo(), handleLinkAlive(), handleLinkDirect(), handleLinkReply(), onLinkChanged(), onLinkDown(), onLinkFail(), onLinkQoSChanged(), onLinkUp(), receiveMessage(), refreshRelayInformation(), send(), send_link(), sendMessage(), and stabilizeRelays().
const EndpointDescriptor & ariba::overlay::BaseOverlay::getEndpointDescriptor | ( | const NodeID & | node | ) | const |
Returns a end-endpoint descriptor of a overlay neighbor. If the node is not known -- an unspecified endpoint descriptor is returned.
node | The node identifer of a overlay neighbor. |
Definition at line 904 of file BaseOverlay.cpp.
References bc, ariba::communication::BaseCommunication::getEndpointDescriptor(), logging_error, nodeId, overlayInterface, ariba::overlay::OverlayInterface::resolveNode(), ariba::communication::EndpointDescriptor::UNSPECIFIED(), and ariba::utility::NodeID::UNSPECIFIED.
const EndpointDescriptor & ariba::overlay::BaseOverlay::getEndpointDescriptor | ( | const LinkID & | link = LinkID::UNSPECIFIED |
) | const |
Returns the end-point descriptor of a link.
link | the link id of the requested end-point |
Definition at line 889 of file BaseOverlay.cpp.
References bc, ariba::overlay::LinkDescriptor::communicationId, getDescriptor(), ariba::communication::BaseCommunication::getEndpointDescriptor(), ariba::communication::EndpointDescriptor::UNSPECIFIED(), and ariba::utility::LinkID::UNSPECIFIED.
Referenced by ariba::utility::PathloadMeasurement::blockingFunction(), ariba::overlay::Chord::discover_neighbors(), ariba::overlay::OneHop::eventFunction(), ariba::SideportListener::getEndpointDescription(), handleJoinRequest(), ariba::overlay::OneHop::onMessage(), ariba::overlay::OneHop::resolveNode(), ariba::overlay::Chord::resolveNode(), and ariba::overlay::Chord::send_discovery_to().
std::string ariba::overlay::BaseOverlay::getLinkHTMLInfo | ( | ) | [protected] |
Definition at line 204 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::isVital(), links, ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, ariba::overlay::LinkDescriptor::routeRecord, ariba::overlay::LinkDescriptor::service, and ariba::utility::Identifier::toString().
Referenced by ariba::SideportListener::getHtmlLinks().
vector< LinkID > ariba::overlay::BaseOverlay::getLinkIDs | ( | const NodeID & | nid = NodeID::UNSPECIFIED |
) | const |
Return all Links for the specified remote nodeid, or all links when the node id given is set to unspecified
nid | The node id to request links for, or unspecified for all links |
Definition at line 1664 of file BaseOverlay.cpp.
References links, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteNode, and ariba::utility::NodeID::UNSPECIFIED.
Referenced by ariba::SideportListener::getLinkIDs().
CommunicationListener * ariba::overlay::BaseOverlay::getListener | ( | const ServiceID & | id | ) | [private] |
Definition at line 65 of file BaseOverlay.cpp.
References communicationListeners, logging_error, and ariba::utility::ServiceID::toString().
Referenced by establishLink(), handleData(), handleLinkReply(), handleLinkRequest(), and onLinkDown().
const NodeID & ariba::overlay::BaseOverlay::getNodeID | ( | const LinkID & | lid = LinkID::UNSPECIFIED |
) | const |
Returns the own nodeID or the NodeID of the specified link
lid | The link identifier |
Definition at line 1657 of file BaseOverlay.cpp.
References getDescriptor(), nodeId, ariba::overlay::LinkDescriptor::remoteNode, ariba::utility::NodeID::UNSPECIFIED, and ariba::utility::LinkID::UNSPECIFIED.
Referenced by ariba::SideportListener::getNodeID(), and ariba::Node::getNodeId().
vector< NodeID > ariba::overlay::BaseOverlay::getOverlayNeighbors | ( | bool | deep = true |
) | const |
return the overlay neighbors
Get a list of overlay neighbors.
Definition at line 1649 of file BaseOverlay.cpp.
References ariba::overlay::OverlayInterface::getKnownNodes(), nodeId, and overlayInterface.
Referenced by ariba::overlay::OverlayBootstrap::checkOverlayStatus(), ariba::Node::getNeighborNodes(), and ariba::SideportListener::getOverlayNeighbors().
LinkDescriptor * ariba::overlay::BaseOverlay::getRelayLinkTo | ( | const NodeID & | remote | ) | [private] |
returns a known relay link
returns a known "vital" relay link which is up and running
Definition at line 521 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::LinkDescriptor::isDirectVital(), ariba::overlay::BaseOverlay::BaseOverlay::relay_route::link, ariba::overlay::BaseOverlay::BaseOverlay::relay_route::node, relay_routes, route(), and ariba::overlay::BaseOverlay::BaseOverlay::relay_route::used.
Referenced by send().
bool ariba::overlay::BaseOverlay::handleData | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
Definition at line 1313 of file BaseOverlay.cpp.
References ariba::overlay::OverlayMsg::getDestinationLink(), getListener(), ariba::overlay::OverlayMsg::getService(), ariba::overlay::OverlayMsg::getSourceNode(), logging_debug, ariba::CommunicationListener::onMessage(), ariba::utility::Identifier::toString(), and ariba::utility::ServiceID::toString().
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleJoinReply | ( | OverlayMsg * | msg, | |
const LinkID & | bcLink | |||
) | [private] |
Handle replies to spovnet instance join requests.
Definition at line 1209 of file BaseOverlay.cpp.
References BaseOverlayStateCompleted, bc, bootstrapLinks, ariba::overlay::OverlayFactory::create(), ariba::overlay::OverlayInterface::createOverlay(), ariba::communication::BaseCommunication::dropLink(), ariba::overlay::JoinReply::getBootstrapEndpoint(), ariba::overlay::JoinReply::getJoinAllowed(), ariba::overlay::JoinReply::getParam(), ariba::overlay::JoinReply::getSpoVNetID(), ariba::utility::Identifier::isUnspecified(), ariba::overlay::OverlayInterface::joinOverlay(), logging_debug, logging_error, logging_info, nodeId, nodeListeners, ariba::NodeListener::onJoinCompleted(), ariba::NodeListener::onJoinFailed(), overlayBootstrap, overlayInterface, ariba::overlay::OverlayBootstrap::recordJoin(), spovnetId, state, ariba::communication::EndpointDescriptor::toString(), and ariba::utility::Identifier::toString().
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleJoinRequest | ( | OverlayMsg * | msg, | |
const LinkID & | bcLink | |||
) | [private] |
Handle spovnet instance join requests.
Definition at line 1170 of file BaseOverlay.cpp.
References bc, getEndpointDescriptor(), ariba::overlay::OverlayInterface::getParameters(), ariba::overlay::OverlayMsg::getSourceNode(), ariba::overlay::JoinRequest::getSpoVNetID(), joiningNodes, logging_debug, logging_error, logging_info, nodeId, ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID, overlayInterface, ariba::communication::BaseCommunication::sendMessage(), spovnetId, ariba::utility::Identifier::toString(), and ariba::overlay::OverlayMsg::typeJoinReply.
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleLinkAlive | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
handle a keep-alive message for a link
Definition at line 1512 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::OverlayMsg::getDestinationLink(), ariba::overlay::OverlayMsg::getRouteRecord(), ariba::overlay::OverlayMsg::isRouteRecord(), logging_debug, logging_error, ariba::overlay::LinkDescriptor::routeRecord, and ariba::overlay::LinkDescriptor::setAlive().
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleLinkDirect | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
handle a direct link message
get destination overlay link
Definition at line 1529 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::communicationId, ariba::overlay::LinkDescriptor::communicationUp, eraseDescriptor(), getDescriptor(), ariba::overlay::OverlayMsg::getDestinationLink(), logging_debug, logging_error, logging_info, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::setAlive(), and ariba::overlay::LinkDescriptor::setAutoUsed().
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleLinkReply | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
Definition at line 1451 of file BaseOverlay.cpp.
References bc, ariba::overlay::LinkDescriptor::communicationId, ariba::communication::BaseCommunication::establishLink(), getDescriptor(), ariba::overlay::OverlayMsg::getDestinationLink(), getListener(), ariba::overlay::OverlayMsg::getService(), ariba::overlay::OverlayMsg::getSourceEndpoint(), ariba::overlay::OverlayMsg::getSourceLink(), ariba::overlay::OverlayMsg::getSourceNode(), ariba::overlay::LinkDescriptor::listener, logging_debug, logging_error, logging_info, logging_warn, ariba::overlay::LinkDescriptor::messageQueue, ariba::CommunicationListener::onLinkUp(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteLink, ariba::overlay::LinkDescriptor::remoteNode, sendMessage(), ariba::overlay::LinkDescriptor::service, ariba::overlay::LinkDescriptor::setAlive(), ariba::overlay::LinkDescriptor::setAutoUsed(), ariba::communication::EndpointDescriptor::toString(), ariba::utility::ServiceID::toString(), ariba::utility::Identifier::toString(), and ariba::overlay::LinkDescriptor::up.
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleLinkRequest | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
handle a link request and reply
Definition at line 1414 of file BaseOverlay.cpp.
References addDescriptor(), bc, ariba::communication::BaseCommunication::getEndpointDescriptor(), getListener(), ariba::overlay::OverlayMsg::getService(), ariba::overlay::OverlayMsg::getSourceLink(), ariba::overlay::OverlayMsg::getSourceNode(), logging_info, send(), ariba::overlay::OverlayMsg::setRelayed(), ariba::overlay::OverlayMsg::setSourceEndpoint(), ariba::overlay::OverlayMsg::setSourceLink(), ariba::overlay::OverlayMsg::setType(), ariba::overlay::OverlayMsg::swapRoles(), and ariba::overlay::OverlayMsg::typeLinkReply.
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleLinkUpdate | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
Definition at line 1330 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::autolink, communicationListeners, ariba::CommunicationListener::DEFAULT, dropLink(), ariba::overlay::OverlayMsg::getService(), ariba::overlay::OverlayMsg::getSourceLink(), ariba::overlay::OverlayMsg::getSourceNode(), ariba::overlay::OverlayMsg::isAutoLink(), ariba::overlay::LinkDescriptor::listener, logging_debug, logging_info, logging_warn, ariba::overlay::LinkDescriptor::messageQueue, nodeId, ariba::CommunicationListener::onLinkRequest(), ariba::SideportListener::onLinkUp(), ariba::CommunicationListener::onLinkUp(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteLink, ariba::overlay::LinkDescriptor::remoteNode, send(), sendMessage(), ariba::overlay::LinkDescriptor::service, ariba::overlay::LinkDescriptor::setAlive(), ariba::overlay::LinkDescriptor::setAutoUsed(), ariba::overlay::OverlayMsg::setService(), ariba::overlay::OverlayMsg::setSourceLink(), ariba::overlay::OverlayMsg::setSourceNode(), sideport, ariba::overlay::OverlayMsg::swapRoles(), ariba::utility::ServiceID::toString(), ariba::utility::Identifier::toString(), and ariba::overlay::LinkDescriptor::up.
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::handleMessage | ( | const Message * | message, | |
LinkDescriptor * | ld, | |||
const LinkID | bcLink = LinkID::UNSPECIFIED | |||
) | [private] |
demultiplexes a incoming message with link descriptor
handles an incoming message
Definition at line 1555 of file BaseOverlay.cpp.
References handleData(), handleJoinReply(), handleJoinRequest(), handleLinkAlive(), handleLinkDirect(), handleLinkReply(), handleLinkRequest(), handleLinkUpdate(), logging_debug, logging_error, nodeId, ariba::overlay::OverlayInterface::onMessage(), overlayInterface, refreshRelayInformation(), route(), ariba::overlay::OverlayMsg::typeData, ariba::overlay::OverlayMsg::typeJoinReply, ariba::overlay::OverlayMsg::typeJoinRequest, ariba::overlay::OverlayMsg::typeLinkAlive, ariba::overlay::OverlayMsg::typeLinkDirect, ariba::overlay::OverlayMsg::typeLinkReply, ariba::overlay::OverlayMsg::typeLinkRequest, ariba::overlay::OverlayMsg::typeLinkUpdate, ariba::overlay::OverlayMsg::typeSignalingEnd, ariba::overlay::OverlayMsg::typeSignalingStart, ariba::utility::LinkID::UNSPECIFIED, and ariba::utility::NodeID::UNSPECIFIED.
Referenced by receiveMessage(), route(), and send().
bool ariba::overlay::BaseOverlay::handleSignaling | ( | OverlayMsg * | msg, | |
LinkDescriptor * | ld | |||
) | [private] |
bool ariba::overlay::BaseOverlay::isStarted | ( | ) |
Is the BaseOverlay instance started up yet
Definition at line 593 of file BaseOverlay.cpp.
References started.
Referenced by ariba::Node::initiate(), and ariba::Node::join().
void ariba::overlay::BaseOverlay::joinSpoVNet | ( | const SpoVNetID & | id, | |
const EndpointDescriptor & | boot = EndpointDescriptor::UNSPECIFIED() | |||
) |
Join a existing sponaneous virtual network (spovnet).
id | A spovnet identifier | |
boot | A bootstrap node |
Definition at line 599 of file BaseOverlay.cpp.
References BaseOverlayStateCompleted, BaseOverlayStateInvalid, bc, bootstrapLinks, ariba::communication::BaseCommunication::establishLink(), ariba::communication::BaseCommunication::getEndpointDescriptor(), ariba::communication::EndpointDescriptor::isUnspecified(), ariba::overlay::OverlayInterface::joinOverlay(), logging_debug, logging_error, logging_info, nodeId, nodeListeners, ariba::NodeListener::onJoinCompleted(), overlayBootstrap, overlayInterface, ariba::overlay::OverlayBootstrap::publish(), spovnetId, ariba::overlay::OverlayBootstrap::start(), state, ariba::communication::EndpointDescriptor::toString(), and ariba::utility::Identifier::toString().
Referenced by ariba::overlay::OverlayBootstrap::checkOverlayStatus(), ariba::overlay::OverlayBootstrap::handleSystemEvent(), and ariba::Node::join().
void ariba::overlay::BaseOverlay::leaveSpoVNet | ( | ) |
Let the node leave the SpoVNet.
Definition at line 640 of file BaseOverlay.cpp.
References BaseOverlayStateInvalid, bc, bootstrapLinks, ariba::communication::BaseCommunication::dropLink(), dropLink(), ariba::overlay::OverlayInterface::leaveOverlay(), links, logging_debug, logging_info, nodeListeners, ariba::NodeListener::onLeaveCompleted(), ariba::NodeListener::onLeaveFailed(), ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID, overlayBootstrap, ariba::overlay::LinkDescriptor::overlayId, overlayInterface, ariba::overlay::OverlayBootstrap::revoke(), ariba::overlay::LinkDescriptor::service, spovnetId, state, and ariba::overlay::OverlayBootstrap::stop().
Referenced by ariba::Node::leave().
void ariba::overlay::BaseOverlay::onLinkChanged | ( | const LinkID & | id, | |
const address_v * | oldlocal, | |||
const address_v * | newlocal, | |||
const address_v * | oldremote, | |||
const address_v * | newremote | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1108 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::LinkDescriptor::listener, logging_debug, nodeId, ariba::SideportListener::onLinkChanged(), ariba::CommunicationListener::onLinkChanged(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteNode, ariba::overlay::LinkDescriptor::setAutoUsed(), and sideport.
void ariba::overlay::BaseOverlay::onLinkDown | ( | const LinkID & | id, | |
const address_v * | local, | |||
const address_v * | remote | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1075 of file BaseOverlay.cpp.
References bootstrapLinks, ariba::overlay::LinkDescriptor::communicationUp, eraseDescriptor(), ariba::overlay::LinkDescriptor::flushQueue(), getDescriptor(), getListener(), ariba::utility::ServiceID::isUnspecified(), logging_info, logging_warn, ariba::overlay::LinkDescriptor::messageQueue, nodeId, ariba::SideportListener::onLinkDown(), ariba::CommunicationListener::onLinkDown(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteNode, removeRelayLink(), ariba::overlay::LinkDescriptor::service, and sideport.
void ariba::overlay::BaseOverlay::onLinkFail | ( | const LinkID & | id, | |
const address_v * | local, | |||
const address_v * | remote | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1125 of file BaseOverlay.cpp.
References bootstrapLinks, getDescriptor(), ariba::overlay::LinkDescriptor::listener, logging_debug, nodeId, ariba::SideportListener::onLinkFail(), ariba::CommunicationListener::onLinkFail(), ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::remoteNode, sideport, and ariba::utility::Identifier::toString().
void ariba::overlay::BaseOverlay::onLinkQoSChanged | ( | const LinkID & | id, | |
const address_v * | local, | |||
const address_v * | remote, | |||
const QoSParameterSet & | qos | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1143 of file BaseOverlay.cpp.
References getDescriptor(), logging_debug, ariba::overlay::LinkDescriptor::overlayId, and ariba::utility::Identifier::toString().
bool ariba::overlay::BaseOverlay::onLinkRequest | ( | const LinkID & | id, | |
const address_v * | local, | |||
const address_v * | remote | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1153 of file BaseOverlay.cpp.
References logging_debug, and ariba::addressing::address_v::to_string().
void ariba::overlay::BaseOverlay::onLinkUp | ( | const LinkID & | id, | |
const address_v * | local, | |||
const address_v * | remote | |||
) | [protected, virtual] |
Reimplemented from ariba::communication::CommunicationEvents.
Definition at line 1002 of file BaseOverlay.cpp.
References addDescriptor(), ariba::overlay::LinkDescriptor::autolink, bc, bootstrapLinks, ariba::overlay::LinkDescriptor::communicationId, ariba::overlay::LinkDescriptor::communicationUp, ariba::overlay::LinkDescriptor::fromRemote, getDescriptor(), logging_debug, logging_info, nodeId, ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteLink, send_link(), ariba::communication::BaseCommunication::sendMessage(), ariba::overlay::LinkDescriptor::service, ariba::overlay::LinkDescriptor::setAlive(), ariba::overlay::LinkDescriptor::setAutoUsed(), ariba::overlay::OverlayMsg::setDestinationLink(), ariba::overlay::OverlayMsg::setSourceLink(), spovnetId, ariba::utility::ServiceID::toString(), ariba::utility::Identifier::toString(), ariba::overlay::OverlayMsg::typeJoinRequest, ariba::overlay::OverlayMsg::typeLinkDirect, ariba::overlay::OverlayMsg::typeLinkUpdate, and ariba::overlay::LinkDescriptor::up.
void ariba::overlay::BaseOverlay::onNodeJoin | ( | const NodeID & | node | ) | [protected, virtual] |
This method is called, when a new node joined the network
Reimplemented from ariba::overlay::OverlayStructureEvents.
Definition at line 1675 of file BaseOverlay.cpp.
References joiningNodes, logging_info, and ariba::utility::Identifier::toString().
bool ariba::overlay::BaseOverlay::receiveMessage | ( | const Message * | message, | |
const LinkID & | link, | |||
const NodeID & | ||||
) | [protected, virtual] |
handles a message from base communication
Processes a received message from BaseCommunication
In case of a message routed by the overlay the source identifies the node the message came from!
Definition at line 1160 of file BaseOverlay.cpp.
References getDescriptor(), and handleMessage().
void ariba::overlay::BaseOverlay::refreshRelayInformation | ( | const OverlayMsg * | message, | |
LinkDescriptor * | ld | |||
) | [private] |
refreshes relay information
Definition at line 459 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::OverlayMsg::getDestinationNode(), ariba::overlay::OverlayMsg::getNumHops(), ariba::overlay::OverlayMsg::getSourceNode(), ariba::overlay::BaseOverlay::BaseOverlay::relay_route::hops, ariba::overlay::LinkDescriptor::isDirectVital(), ariba::overlay::OverlayMsg::isRegisterRelay(), ariba::overlay::OverlayMsg::isRelayed(), ariba::overlay::BaseOverlay::BaseOverlay::relay_route::link, logging_info, ariba::overlay::BaseOverlay::BaseOverlay::relay_route::node, nodeId, ariba::overlay::LinkDescriptor::overlayId, relay_routes, ariba::overlay::LinkDescriptor::relayed, route(), ariba::overlay::LinkDescriptor::setRelaying(), ariba::utility::Identifier::toString(), and ariba::overlay::BaseOverlay::BaseOverlay::relay_route::used.
Referenced by handleMessage().
bool ariba::overlay::BaseOverlay::registerSidePort | ( | SideportListener * | _sideport | ) |
Definition at line 923 of file BaseOverlay.cpp.
References ariba::SideportListener::configure(), and sideport.
Referenced by ariba::Node::bind().
void ariba::overlay::BaseOverlay::removeRelayLink | ( | const LinkID & | link | ) | [private] |
removes relay link information
Definition at line 442 of file BaseOverlay.cpp.
References ariba::overlay::BaseOverlay::BaseOverlay::relay_route::link, relay_routes, and route().
Referenced by onLinkDown().
void ariba::overlay::BaseOverlay::removeRelayNode | ( | const NodeID & | link | ) | [private] |
removes relay node information
Definition at line 450 of file BaseOverlay.cpp.
References ariba::overlay::BaseOverlay::BaseOverlay::relay_route::node, relay_routes, and route().
Referenced by route().
void ariba::overlay::BaseOverlay::route | ( | OverlayMsg * | message | ) | [private] |
routes a message to its destination node
Definition at line 273 of file BaseOverlay.cpp.
References ariba::overlay::OverlayMsg::getDestinationNode(), ariba::overlay::OverlayMsg::getNumHops(), ariba::overlay::OverlayMsg::getTimeToLive(), handleMessage(), logging_warn, nodeId, removeRelayNode(), and send().
Referenced by getRelayLinkTo(), handleMessage(), ariba::overlay::Chord::onMessage(), refreshRelayInformation(), removeRelayLink(), removeRelayNode(), and stabilizeRelays().
seqnum_t ariba::overlay::BaseOverlay::send | ( | OverlayMsg * | message, | |
LinkDescriptor * | ld, | |||
bool | ignore_down = false | |||
) | [private] |
send a raw message using a link descriptor, delivers it to the base overlay class
send a message using a link descriptor, delivers it to the base overlay class
Definition at line 356 of file BaseOverlay.cpp.
References bc, ariba::overlay::LinkDescriptor::communicationId, ariba::overlay::LinkDescriptor::communicationUp, getRelayLinkTo(), logging_debug, logging_error, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteNode, ariba::communication::BaseCommunication::sendMessage(), ariba::overlay::OverlayMsg::setRelayed(), ariba::overlay::LinkDescriptor::setRelaying(), and ariba::overlay::LinkDescriptor::up.
seqnum_t ariba::overlay::BaseOverlay::send | ( | OverlayMsg * | message, | |
const NodeID & | destination | |||
) | [private] |
sends a raw message to another node, delivers it to the base overlay class
sends a message to another node, delivers it to the base overlay class
Definition at line 299 of file BaseOverlay.cpp.
References bc, ariba::overlay::LinkDescriptor::communicationId, getDescriptor(), ariba::overlay::OverlayInterface::getNextLinkId(), getRelayLinkTo(), handleMessage(), ariba::overlay::OverlayMsg::isRelayed(), ariba::utility::Identifier::isUnspecified(), logging_warn, nodeId, overlayInterface, ariba::communication::BaseCommunication::sendMessage(), ariba::overlay::LinkDescriptor::setRelaying(), and ariba::overlay::LinkDescriptor::up.
Referenced by handleLinkRequest(), handleLinkUpdate(), ariba::overlay::Chord::onMessage(), route(), send_link(), and send_node().
seqnum_t ariba::overlay::BaseOverlay::send_link | ( | OverlayMsg * | message, | |
const LinkID & | link, | |||
bool | ignore_down = false | |||
) | [private] |
send a message using a node id using overlay routing using a link sets necessary fields in the overlay message!
Definition at line 404 of file BaseOverlay.cpp.
References getDescriptor(), logging_error, nodeId, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::remoteLink, ariba::overlay::LinkDescriptor::remoteNode, send(), ariba::overlay::LinkDescriptor::service, ariba::overlay::OverlayMsg::setDestinationLink(), ariba::overlay::OverlayMsg::setDestinationNode(), ariba::overlay::OverlayMsg::setRelayed(), ariba::overlay::OverlayMsg::setService(), ariba::overlay::OverlayMsg::setSourceLink(), ariba::overlay::OverlayMsg::setSourceNode(), and ariba::utility::Identifier::toString().
Referenced by onLinkUp(), ariba::overlay::Chord::send(), sendMessage(), and stabilizeLinks().
seqnum_t ariba::overlay::BaseOverlay::send_node | ( | OverlayMsg * | message, | |
const NodeID & | remote, | |||
const ServiceID & | service = OverlayInterface::OVERLAY_SERVICE_ID | |||
) | [private] |
send a message using a node id using overlay routing sets necessary fields in the overlay message!
Definition at line 396 of file BaseOverlay.cpp.
References nodeId, send(), ariba::overlay::OverlayMsg::setDestinationNode(), ariba::overlay::OverlayMsg::setService(), and ariba::overlay::OverlayMsg::setSourceNode().
Referenced by establishLink(), and ariba::overlay::Chord::send_discovery_to().
seqnum_t ariba::overlay::BaseOverlay::sendMessage | ( | const Message * | message, | |
const NodeID & | remote, | |||
const ServiceID & | service = OverlayInterface::OVERLAY_SERVICE_ID | |||
) |
sends a message to a node and a specific service
Definition at line 851 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::autolink, establishLink(), getAutoDescriptor(), getDescriptor(), logging_debug, logging_error, logging_info, ariba::overlay::LinkDescriptor::overlayId, sendMessage(), ariba::overlay::LinkDescriptor::setAutoUsed(), ariba::utility::ServiceID::toString(), and ariba::utility::Identifier::toString().
sends a message over an existing link
internal send message, always use this functions to send messages over links
Definition at line 818 of file BaseOverlay.cpp.
References data_serialize(), getDescriptor(), logging_debug, logging_error, logging_info, send_link(), ariba::utility::Identifier::toString(), and ariba::overlay::OverlayMsg::typeData.
Referenced by broadcastMessage(), handleLinkReply(), handleLinkUpdate(), ariba::overlay::OneHop::leaveOverlay(), ariba::overlay::OneHop::onLinkUp(), ariba::overlay::OneHop::onMessage(), ariba::overlay::OneHop::routeMessage(), sendMessage(), and ariba::Node::sendMessage().
void ariba::overlay::BaseOverlay::showLinks | ( | ) | [private] |
print the currently known links
shows the current link state
Definition at line 245 of file BaseOverlay.cpp.
References links, and logging_info.
Referenced by stabilizeLinks().
void ariba::overlay::BaseOverlay::stabilizeLinks | ( | ) | [private] |
stabilizes link information
Definition at line 128 of file BaseOverlay.cpp.
References ariba::overlay::LinkDescriptor::autolink, counter, ariba::overlay::LinkDescriptor::dropAfterRelaying, dropLink(), ariba::overlay::LinkDescriptor::keepAliveMissed, ariba::overlay::LinkDescriptor::keepAliveTime, ariba::overlay::LinkDescriptor::lastuse, links, logging_info, nodeId, ariba::overlay::OverlayInterface::OVERLAY_SERVICE_ID, ariba::overlay::LinkDescriptor::overlayId, ariba::overlay::LinkDescriptor::relayed, ariba::overlay::LinkDescriptor::relaying, ariba::overlay::LinkDescriptor::remoteNode, send_link(), ariba::overlay::OverlayMsg::setRouteRecord(), showLinks(), ariba::overlay::LinkDescriptor::timeRelaying, ariba::overlay::OverlayMsg::typeLinkAlive, and ariba::overlay::LinkDescriptor::up.
Referenced by eventFunction().
void ariba::overlay::BaseOverlay::stabilizeRelays | ( | ) | [private] |
stabilize relay information
Definition at line 424 of file BaseOverlay.cpp.
References getDescriptor(), ariba::overlay::LinkDescriptor::isDirectVital(), ariba::overlay::BaseOverlay::BaseOverlay::relay_route::link, logging_info, ariba::overlay::BaseOverlay::BaseOverlay::relay_route::node, relay_routes, route(), ariba::utility::Identifier::toString(), and ariba::overlay::BaseOverlay::BaseOverlay::relay_route::used.
Referenced by eventFunction().
void ariba::overlay::BaseOverlay::start | ( | BaseCommunication & | _basecomm, | |
const NodeID & | _nodeid | |||
) |
Starts the Base Overlay instance
Definition at line 554 of file BaseOverlay.cpp.
References BaseOverlayStateInvalid, bc, logging_info, nodeId, ariba::communication::BaseCommunication::registerEventListener(), ariba::communication::BaseCommunication::registerMessageReceiver(), ariba::utility::Timer::setInterval(), ariba::utility::Timer::start(), started, and state.
Referenced by ariba::Node::initiate(), and ariba::Node::join().
void ariba::overlay::BaseOverlay::stop | ( | ) |
Stops the Base Overlay instance
Reimplemented from ariba::utility::Timer.
Definition at line 573 of file BaseOverlay.cpp.
References BaseOverlayStateInvalid, bc, logging_info, overlayInterface, started, state, ariba::communication::BaseCommunication::unregisterEventListener(), and ariba::communication::BaseCommunication::unregisterMessageReceiver().
Referenced by ariba::Node::leave().
bool ariba::overlay::BaseOverlay::unbind | ( | NodeListener * | listener | ) |
Definition at line 985 of file BaseOverlay.cpp.
References logging_debug, logging_warn, and nodeListeners.
bool ariba::overlay::BaseOverlay::unbind | ( | CommunicationListener * | listener, | |
const ServiceID & | sid | |||
) |
Definition at line 949 of file BaseOverlay.cpp.
References communicationListeners, logging_debug, logging_warn, and ariba::utility::ServiceID::toString().
Referenced by ariba::Node::unbind(), and ariba::overlay::OverlayInterface::~OverlayInterface().
bool ariba::overlay::BaseOverlay::unregisterSidePort | ( | SideportListener * | _sideport | ) |
Definition at line 928 of file BaseOverlay.cpp.
References ariba::SideportListener::DEFAULT, and sideport.
ariba::overlay::BaseOverlay::use_logging_h | ( | BaseOverlay | ) | [private] |
friend class ariba::SideportListener [friend] |
Definition at line 132 of file BaseOverlay.h.
friend class Chord [friend] |
Definition at line 131 of file BaseOverlay.h.
friend class OneHop [friend] |
Definition at line 130 of file BaseOverlay.h.
BaseCommunication* ariba::overlay::BaseOverlay::bc [private] |
reference to the base communication
Definition at line 362 of file BaseOverlay.h.
Referenced by dropLink(), establishDirectLink(), getEndpointDescriptor(), ariba::SideportListener::getReachabilityProtocol(), handleJoinReply(), handleJoinRequest(), handleLinkReply(), handleLinkRequest(), joinSpoVNet(), leaveSpoVNet(), onLinkUp(), send(), start(), and stop().
vector<LinkID> ariba::overlay::BaseOverlay::bootstrapLinks [private] |
the link id of the link to the initiator node
Definition at line 365 of file BaseOverlay.h.
Referenced by handleJoinReply(), joinSpoVNet(), leaveSpoVNet(), onLinkDown(), onLinkFail(), and onLinkUp().
Demultiplexer<CommunicationListener*, ServiceID> ariba::overlay::BaseOverlay::communicationListeners [private] |
the service id communication listeners
Definition at line 369 of file BaseOverlay.h.
Referenced by bind(), establishDirectLink(), getListener(), handleLinkUpdate(), and unbind().
int ariba::overlay::BaseOverlay::counter [private] |
link state information counter
Definition at line 409 of file BaseOverlay.h.
Referenced by stabilizeLinks().
vector<LinkDescriptor*> ariba::overlay::BaseOverlay::links [private] |
The link mapping of the node.
Definition at line 412 of file BaseOverlay.h.
Referenced by addDescriptor(), eraseDescriptor(), getAutoDescriptor(), getDescriptor(), getLinkHTMLInfo(), getLinkIDs(), ariba::SideportListener::getReachabilityProtocol(), ariba::SideportListener::isRelayedNode(), ariba::SideportListener::isRelayingNode(), leaveSpoVNet(), showLinks(), and stabilizeLinks().
NodeID ariba::overlay::BaseOverlay::nodeId [private] |
the node id of this node
Definition at line 363 of file BaseOverlay.h.
Referenced by broadcastMessage(), createSpoVNet(), establishLink(), getEndpointDescriptor(), getNodeID(), getOverlayNeighbors(), handleJoinReply(), handleJoinRequest(), handleLinkUpdate(), handleMessage(), joinSpoVNet(), onLinkChanged(), onLinkDown(), onLinkFail(), onLinkUp(), refreshRelayInformation(), route(), send(), send_link(), send_node(), stabilizeLinks(), and start().
Definition at line 374 of file BaseOverlay.h.
Referenced by bind(), createSpoVNet(), handleJoinReply(), joinSpoVNet(), leaveSpoVNet(), and unbind().
Bootstrapper for our spovnet.
Definition at line 383 of file BaseOverlay.h.
Referenced by handleJoinReply(), joinSpoVNet(), and leaveSpoVNet().
the used overlay structure
Definition at line 380 of file BaseOverlay.h.
Referenced by broadcastMessage(), createSpoVNet(), getEndpointDescriptor(), getOverlayNeighbors(), handleJoinReply(), handleJoinRequest(), handleMessage(), joinSpoVNet(), leaveSpoVNet(), send(), and stop().
vector<relay_route> ariba::overlay::BaseOverlay::relay_routes [private] |
Definition at line 450 of file BaseOverlay.h.
Referenced by getRelayLinkTo(), refreshRelayInformation(), removeRelayLink(), removeRelayNode(), and stabilizeRelays().
the sideport listener
Definition at line 377 of file BaseOverlay.h.
Referenced by dropLink(), handleLinkUpdate(), onLinkChanged(), onLinkDown(), onLinkFail(), registerSidePort(), and unregisterSidePort().
the spovnet id of the currently joined overlay
Definition at line 364 of file BaseOverlay.h.
Referenced by createSpoVNet(), handleJoinReply(), handleJoinRequest(), joinSpoVNet(), leaveSpoVNet(), and onLinkUp().
bool ariba::overlay::BaseOverlay::started [private] |
is the base overlay started yet
Definition at line 353 of file BaseOverlay.h.
Referenced by isStarted(), start(), and stop().
Current Base-Overlay state.
Definition at line 361 of file BaseOverlay.h.
Referenced by createSpoVNet(), handleJoinReply(), joinSpoVNet(), leaveSpoVNet(), start(), and stop().