nfd::ManagerBase Class Referenceabstract

a collection of common functions shared by all NFD managers and RIB manager, such as communicating with the dispatcher and command validator. More...

#include <core/manager-base.hpp>

+ Inheritance diagram for nfd::ManagerBase:
+ Collaboration diagram for nfd::ManagerBase:

Classes

class  Error
 

Public Member Functions

 ManagerBase (Dispatcher &dispatcher, const std::string &module)
 
virtual ~ManagerBase ()
 
const std::string & getModule () const
 

Protected Types

typedef function< void(const ControlCommand &command, const Name &prefix, const Interest &interest, const ControlParameters &parameters, const ndn::mgmt::CommandContinuation done)> ControlCommandHandler
 

Protected Member Functions

void extractRequester (const Interest &interest, ndn::mgmt::AcceptContinuation accept)
 extract a requester from a ControlCommand request More...
 
template<typename Command >
void registerCommandHandler (const std::string &verb, const ControlCommandHandler &handler)
 
ndn::mgmt::PostNotification registerNotificationStream (const std::string &verb)
 
void registerStatusDatasetHandler (const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler)
 

Detailed Description

a collection of common functions shared by all NFD managers and RIB manager, such as communicating with the dispatcher and command validator.

Definition at line 48 of file manager-base.hpp.

Member Typedef Documentation

typedef function<void(const ControlCommand& command, const Name& prefix, const Interest& interest, const ControlParameters& parameters, const ndn::mgmt::CommandContinuation done)> nfd::ManagerBase::ControlCommandHandler
protected

Definition at line 78 of file manager-base.hpp.

Constructor & Destructor Documentation

nfd::ManagerBase::ManagerBase ( Dispatcher &  dispatcher,
const std::string &  module 
)

Definition at line 33 of file manager-base.cpp.

nfd::ManagerBase::~ManagerBase ( )
virtualdefault

Member Function Documentation

void nfd::ManagerBase::extractRequester ( const Interest &  interest,
ndn::mgmt::AcceptContinuation  accept 
)
protected

extract a requester from a ControlCommand request

This is called after the signature is validated.

Parameters
interesta request for ControlCommand
acceptcallback of successful validation, take the requester string as a argument

Definition at line 57 of file manager-base.cpp.

const std::string& nfd::ManagerBase::getModule ( ) const
inline

Definition at line 68 of file manager-base.hpp.

template<typename Command >
void nfd::ManagerBase::registerCommandHandler ( const std::string &  verb,
const ControlCommandHandler handler 
)
inlineprotected

Definition at line 156 of file manager-base.hpp.

ndn::mgmt::PostNotification nfd::ManagerBase::registerNotificationStream ( const std::string &  verb)
protected

Definition at line 51 of file manager-base.cpp.

void nfd::ManagerBase::registerStatusDatasetHandler ( const std::string &  verb,
const ndn::mgmt::StatusDatasetHandler &  handler 
)
protected

Definition at line 42 of file manager-base.cpp.