#include <source/ariba/AribaModule.h>
Inherits ariba::Module.
Classes | |
class | BootstrapInfo |
class | BootstrapNode |
Public Member Functions | |
AribaModule () | |
virtual | ~AribaModule () |
string | getBootstrapHints (const Name &spoVNetName=Name::UNSPECIFIED) const |
void | addBootstrapHints (string bootinfo) |
void | registerSideportListener (SideportListener *sideport) |
void | initialize () |
void | start () |
void | stop () |
string | getName () const |
void | setProperty (string key, string value) |
const string | getProperty (string key) const |
const vector< string > | getProperties () const |
const string | getLocalEndpoints () |
Protected Member Functions | |
void | addBootstrapNode (const Name &spovnet, communication::EndpointDescriptor *desc) |
const communication::EndpointDescriptor * | getBootstrapNode (const Name &spovnet) const |
Protected Attributes | |
string | bootstrapFile |
string | endpoints |
bool | started |
communication::BaseCommunication * | base_comm |
SideportListener * | sideport_sniffer |
Private Member Functions | |
use_logging_h (AribaModule) | |
Private Attributes | |
vector< BootstrapInfo > | bootstrapNodes |
Friends | |
class | Node |
+---+ +---+ |N1 | |N2 | +--| |---| |--+ | +---+ +---+ | | | | AribaModule | +-----------------+
N1, N2 are nodes.
Definition at line 87 of file AribaModule.h.
ariba::AribaModule::AribaModule | ( | ) |
Constructor of the ariba underlay module
Definition at line 61 of file AribaModule.cpp.
References endpoints.
ariba::AribaModule::~AribaModule | ( | ) | [virtual] |
Destructor of the ariba underlay module
Definition at line 71 of file AribaModule.cpp.
void ariba::AribaModule::addBootstrapHints | ( | string | bootinfo | ) |
Adds bootstrap hints to the local database. The format of the string must is the same as returned by getBootstrapInfo
.
bootinfo | A string containing bootstrap information. |
Definition at line 89 of file AribaModule.cpp.
References addBootstrapNode(), logging_debug, ariba::utility::string_format::robject_data, ariba::utility::string_format::robject_id, ariba::utility::string_format::robjects, and ariba::communication::EndpointDescriptor::toString().
Referenced by setProperty().
void ariba::AribaModule::addBootstrapNode | ( | const Name & | spovnet, | |
communication::EndpointDescriptor * | desc | |||
) | [protected] |
Definition at line 110 of file AribaModule.cpp.
References bootstrapNodes, ariba::AribaModule::AribaModule::BootstrapNode::desc, getBootstrapHints(), logging_debug, ariba::AribaModule::AribaModule::BootstrapInfo::nodes, ariba::AribaModule::AribaModule::BootstrapInfo::spovnetName, and ariba::AribaModule::AribaModule::BootstrapNode::timestamp.
Referenced by addBootstrapHints().
string ariba::AribaModule::getBootstrapHints | ( | const Name & | spoVNetName = Name::UNSPECIFIED |
) | const |
Returns all known bootstrap endpoints to this ariba module in a human-readable string. This information can be used by other nodes for bootstraping. It may also be used to publish this info to other nodes via the web, for example.
The | name of the spovnet |
Definition at line 74 of file AribaModule.cpp.
References bootstrapNodes, ariba::AribaModule::AribaModule::BootstrapNode::desc, ariba::AribaModule::AribaModule::BootstrapInfo::nodes, ariba::AribaModule::AribaModule::BootstrapInfo::spovnetName, ariba::communication::EndpointDescriptor::toString(), and ariba::Name::toString().
Referenced by addBootstrapNode(), and getProperty().
const communication::EndpointDescriptor * ariba::AribaModule::getBootstrapNode | ( | const Name & | spovnet | ) | const [protected] |
Definition at line 139 of file AribaModule.cpp.
References bootstrapNodes, ariba::AribaModule::AribaModule::BootstrapNode::desc, ariba::AribaModule::AribaModule::BootstrapInfo::nodes, and ariba::AribaModule::AribaModule::BootstrapInfo::spovnetName.
Referenced by ariba::Node::join().
const string ariba::AribaModule::getLocalEndpoints | ( | ) |
Get the local endpoint information
Definition at line 215 of file AribaModule.cpp.
References base_comm, ariba::communication::BaseCommunication::getEndpointDescriptor(), and ariba::communication::EndpointDescriptor::toString().
string ariba::AribaModule::getName | ( | ) | const [virtual] |
const vector< string > ariba::AribaModule::getProperties | ( | ) | const [virtual] |
const string ariba::AribaModule::getProperty | ( | string | key | ) | const [virtual] |
Reimplemented from ariba::Module.
Definition at line 202 of file AribaModule.cpp.
References endpoints, and getBootstrapHints().
void ariba::AribaModule::initialize | ( | ) | [virtual] |
Module Property information:
ip.addr = preferred ip address (otherwise bind to all) tcp.port = preferred tcp port (or use default value) udp.port = preferred udp port (or use default value) bootstrap.hints = used bootstrap hints bootstrap.file = used file for bootstrap information
Reimplemented from ariba::Module.
Definition at line 156 of file AribaModule.cpp.
void ariba::AribaModule::registerSideportListener | ( | SideportListener * | sideport | ) |
Register a sideport for sniffing on communication events and get advanced information. The sniffer is attached to every node that is created on the module. Only one such sniffer can be active system-wide, a new call to this register function will only attach the sniffer to nodes created after the registration call.
sideport | The SideportListener to integrate |
Definition at line 151 of file AribaModule.cpp.
References sideport_sniffer.
void ariba::AribaModule::setProperty | ( | string | key, | |
string | value | |||
) | [virtual] |
Reimplemented from ariba::Module.
Definition at line 196 of file AribaModule.cpp.
References addBootstrapHints(), and endpoints.
Referenced by ariba::application::pingpong::PingPong::startup().
void ariba::AribaModule::start | ( | ) | [virtual] |
Reimplemented from ariba::Module.
Definition at line 166 of file AribaModule.cpp.
References base_comm, endpoints, ariba::communication::BaseCommunication::setEndpoints(), and started.
Referenced by ariba::application::pingpong::PingPong::startup().
void ariba::AribaModule::stop | ( | ) | [virtual] |
Reimplemented from ariba::Module.
Definition at line 179 of file AribaModule.cpp.
References base_comm, and started.
Referenced by ariba::application::pingpong::PingPong::shutdown().
ariba::AribaModule::use_logging_h | ( | AribaModule | ) | [private] |
friend class Node [friend] |
Definition at line 88 of file AribaModule.h.
Definition at line 204 of file AribaModule.h.
Referenced by getLocalEndpoints(), initialize(), ariba::Node::initiate(), ariba::Node::join(), ariba::Node::leave(), start(), and stop().
string ariba::AribaModule::bootstrapFile [protected] |
Definition at line 194 of file AribaModule.h.
vector<BootstrapInfo> ariba::AribaModule::bootstrapNodes [private] |
Definition at line 190 of file AribaModule.h.
Referenced by addBootstrapNode(), getBootstrapHints(), and getBootstrapNode().
string ariba::AribaModule::endpoints [protected] |
Definition at line 195 of file AribaModule.h.
Referenced by AribaModule(), getProperty(), setProperty(), and start().
SideportListener* ariba::AribaModule::sideport_sniffer [protected] |
Definition at line 205 of file AribaModule.h.
Referenced by ariba::Node::bind(), and registerSideportListener().
bool ariba::AribaModule::started [protected] |