nfd::rib::Service Class Reference

initializes and executes NFD-RIB service thread More...

#include <rib/service.hpp>

+ Inheritance diagram for nfd::rib::Service:
+ Collaboration diagram for nfd::rib::Service:

Public Member Functions

 Service (const std::string &configFile, ndn::KeyChain &keyChain)
 create NFD-RIB service More...
 
 Service (const ConfigSection &configSection, ndn::KeyChain &keyChain)
 create NFD-RIB service More...
 
 ~Service ()
 Destructor. More...
 
RibManagergetRibManager ()
 

Static Public Member Functions

static Serviceget ()
 Get a reference to the only instance of this class. More...
 

Detailed Description

initializes and executes NFD-RIB service thread

Only one instance of this class can be created at any time. After initialization, NFD-RIB instance can be started by running the global io_service.

Definition at line 51 of file service.hpp.

Constructor & Destructor Documentation

nfd::rib::Service::Service ( const std::string &  configFile,
ndn::KeyChain &  keyChain 
)

create NFD-RIB service

Parameters
configFileabsolute or relative path of configuration file
keyChainthe KeyChain
Exceptions
std::logic_errorInstance of rib::Service has been already constructed
std::logic_errorInstance of rib::Service is not constructed on RIB thread

Definition at line 89 of file service.cpp.

nfd::rib::Service::Service ( const ConfigSection configSection,
ndn::KeyChain &  keyChain 
)

create NFD-RIB service

Parameters
configSectionparsed configuration section
keyChainthe KeyChain
Note
This constructor overload is more appropriate for integrated environments, such as NS-3 or android. Error messages related to configuration file will use "internal://nfd.conf" as configuration filename.
Exceptions
std::logic_errorInstance of rib::Service has been already constructed
std::logic_errorInstance of rib::Service is not constructed on RIB thread

Definition at line 97 of file service.cpp.

nfd::rib::Service::~Service ( )

Destructor.

Definition at line 133 of file service.cpp.

Member Function Documentation

Service & nfd::rib::Service::get ( )
static

Get a reference to the only instance of this class.

Exceptions
std::logic_errorNo instance has been constructed
std::logic_errorThis function is invoked on a thread other than the RIB thread

Definition at line 139 of file service.cpp.

RibManager& nfd::rib::Service::getRibManager ( )
inline

Definition at line 89 of file service.hpp.