ariba::AribaModule Class Reference

#include <source/ariba/AribaModule.h>

Inheritance diagram for ariba::AribaModule:

Inheritance graph
[legend]
Collaboration diagram for ariba::AribaModule:

Collaboration graph
[legend]

List of all members.

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

Protected Member Functions

void addBootstrapNode (const Name &spovnet, communication::EndpointDescriptor *desc)
const
communication::EndpointDescriptor
getBootstrapNode (const Name &spovnet) const

Protected Attributes

string bootstrapFile
bool started
communication::BaseCommunicationbase_comm
SideportListenersideport_sniffer
communication::NetworkLocator * ip_addr
uint16_t tcp_port
uint16_t udp_port

Private Attributes

vector< BootstrapInfobootstrapNodes

Friends

class Node

Classes

class  BootstrapInfo
class  BootstrapNode


Detailed Description

This class implements a container class for ariba base services. Each node is a running using this base-module. It also manages Bootstrap information in a abstract simple way.

+---+ +---+ |N1 | |N2 | +--| |---| |--+ | +---+ +---+ | | | | AribaModule | +-----------------+

N1, N2 are nodes.

Author:
Sebastian Mies <mies@tm.uka.de>

Christoph Mayer <mayer@tm.uka.de>

Definition at line 87 of file AribaModule.h.


Constructor & Destructor Documentation

ariba::AribaModule::AribaModule (  ) 

Constructor of the ariba underlay module

Definition at line 59 of file AribaModule.cpp.

References tcp_port, and udp_port.

ariba::AribaModule::~AribaModule (  )  [virtual]

Destructor of the ariba underlay module

Definition at line 69 of file AribaModule.cpp.


Member Function Documentation

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.

Parameters:
The name of the spovnet
Returns:
A human-readable string containing all known bootstrap information known to this module.

Definition at line 72 of file AribaModule.cpp.

References bootstrapNodes, ariba::AribaModule::BootstrapNode::desc, ariba::AribaModule::BootstrapInfo::nodes, ariba::AribaModule::BootstrapInfo::spovnetName, ariba::communication::EndpointDescriptor::toString(), and ariba::Name::toString().

Referenced by getProperty().

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.

Parameters:
bootinfo A string containing bootstrap information.

Definition at line 87 of file AribaModule.cpp.

References addBootstrapNode(), ariba::utility::string_format::robject_data, ariba::utility::string_format::robject_id, and ariba::utility::string_format::robjects.

Referenced by setProperty().

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.

Parameters:
sideport The SideportListener to integrate

Definition at line 148 of file AribaModule.cpp.

References sideport_sniffer.

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

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 153 of file AribaModule.cpp.

References base_comm, and started.

void ariba::AribaModule::start (  )  [virtual]

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 163 of file AribaModule.cpp.

References base_comm, and started.

Referenced by ariba::application::pingpong::PingPong::startup().

void ariba::AribaModule::stop (  )  [virtual]

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 175 of file AribaModule.cpp.

References base_comm, and started.

Referenced by ariba::application::pingpong::PingPong::shutdown().

string ariba::AribaModule::getName (  )  const [virtual]

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 187 of file AribaModule.cpp.

void ariba::AribaModule::setProperty ( string  key,
string  value 
) [virtual]

const string ariba::AribaModule::getProperty ( string  key  )  const [virtual]

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 205 of file AribaModule.cpp.

References getBootstrapHints(), ip_addr, tcp_port, udp_port, and ariba::utility::Helper::ultos().

const vector< string > ariba::AribaModule::getProperties (  )  const [virtual]

See also:
Module.h

Reimplemented from ariba::Module.

Definition at line 213 of file AribaModule.cpp.

void ariba::AribaModule::addBootstrapNode ( const Name spovnet,
communication::EndpointDescriptor desc 
) [protected]

const communication::EndpointDescriptor * ariba::AribaModule::getBootstrapNode ( const Name spovnet  )  const [protected]


Friends And Related Function Documentation

friend class Node [friend]

Definition at line 88 of file AribaModule.h.


Member Data Documentation

Definition at line 184 of file AribaModule.h.

Referenced by addBootstrapNode(), getBootstrapHints(), and getBootstrapNode().

Definition at line 188 of file AribaModule.h.

bool ariba::AribaModule::started [protected]

Definition at line 189 of file AribaModule.h.

Referenced by initialize(), start(), and stop().

Definition at line 198 of file AribaModule.h.

Referenced by ariba::Node::bind(), and registerSideportListener().

communication::NetworkLocator* ariba::AribaModule::ip_addr [protected]

Definition at line 201 of file AribaModule.h.

Referenced by getProperty(), ariba::Node::initiate(), ariba::Node::join(), and setProperty().

uint16_t ariba::AribaModule::tcp_port [protected]

uint16_t ariba::AribaModule::udp_port [protected]

Definition at line 202 of file AribaModule.h.

Referenced by AribaModule(), getProperty(), and setProperty().


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

Generated on Wed May 27 18:23:54 2009 for Ariba by  doxygen 1.5.6