A collection of common functions shared by all NFD managers, such as communicating with the dispatcher and command validator. More...
#include <manager-base.hpp>
Classes | |
class | Error |
Public Member Functions | |
virtual | ~ManagerBase () |
const std::string & | getModule () const |
Protected Member Functions | |
ManagerBase (const std::string &module, Dispatcher &dispatcher) | |
ManagerBase (const std::string &module, Dispatcher &dispatcher, CommandAuthenticator &authenticator) | |
template<typename Command > | |
void | registerCommandHandler (const std::string &verb, const ControlCommandHandler &handler) |
void | registerStatusDatasetHandler (const std::string &verb, const ndn::mgmt::StatusDatasetHandler &handler) |
ndn::mgmt::PostNotification | registerNotificationStream (const std::string &verb) |
PartialName | makeRelPrefix (const std::string &verb) |
Generates the relative prefix for a handler by appending the verb name to the module name. More... | |
Static Protected Member Functions | |
static bool | validateParameters (const ControlCommand &command, const ndn::mgmt::ControlParameters ¶meters) |
Validates the parameters for a given command . More... | |
static void | handleCommand (shared_ptr< ControlCommand > command, const ControlCommandHandler &handler, const Name &prefix, const Interest &interest, const ndn::mgmt::ControlParameters ¶ms, const ndn::mgmt::CommandContinuation &done) |
Handles a control command. More... | |
Protected Attributes | |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED | __pad0__: using ControlCommandHandler = std::function<void(const ControlCommand& command |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED const Name & | prefix |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED const Name const Interest & | interest |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED const Name const Interest const ControlParameters & | parameters |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED const Name const Interest const ControlParameters const ndn::mgmt::CommandContinuation | done |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED | __pad1__: static void extractRequester(const Interest& interest |
NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED const ndn::mgmt::AcceptContinuation & | accept |
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE | __pad2__: virtual ndn::mgmt::Authorization makeAuthorization(const std::string& verb) |
A collection of common functions shared by all NFD managers, such as communicating with the dispatcher and command validator.
Definition at line 47 of file manager-base.hpp.
|
virtualdefault |
Referenced by ManagerBase().
|
protected |
Definition at line 30 of file manager-base.cpp.
Referenced by getModule().
|
protected |
Definition at line 36 of file manager-base.cpp.
References ~ManagerBase().
|
inline |
Definition at line 60 of file manager-base.hpp.
References ManagerBase(), and NFD_PUBLIC_WITH_TESTS_ELSE_PROTECTED.
|
protected |
Definition at line 152 of file manager-base.hpp.
References handleCommand(), makeRelPrefix(), and validateParameters().
|
protected |
Definition at line 47 of file manager-base.cpp.
References ndn::mgmt::Dispatcher::addStatusDataset(), ndn::mgmt::makeAcceptAllAuthorization(), and makeRelPrefix().
Referenced by nfd::CsManager::CsManager(), nfd::FaceManager::FaceManager(), nfd::FibManager::FibManager(), and nfd::RibManager::RibManager().
|
protected |
Definition at line 56 of file manager-base.cpp.
References accept, ndn::mgmt::Dispatcher::addNotificationStream(), ndn::Name::at(), ndn::Block::blockFromValue(), ndn::Interest::getName(), interest, nfd::CommandAuthenticator::makeAuthorization(), makeRelPrefix(), ns3::ndn::Name, and ndn::signed_interest::POS_SIG_INFO.
Referenced by nfd::FaceManager::FaceManager().
|
staticprotected |
Validates the parameters
for a given command
.
parameters | the original ControlParameters |
Definition at line 88 of file manager-base.cpp.
References ndn::nfd::ControlCommand::validateRequest().
Referenced by registerCommandHandler().
|
staticprotected |
Handles a control command.
Definition at line 103 of file manager-base.cpp.
References parameters.
Referenced by registerCommandHandler().
|
inlineprotected |
Generates the relative prefix for a handler by appending the verb name to the module name.
verb | the verb name |
Definition at line 139 of file manager-base.hpp.
References ndn::Name::append().
Referenced by registerCommandHandler(), registerNotificationStream(), and registerStatusDatasetHandler().
|
protected |
Definition at line 76 of file manager-base.hpp.
|
protected |
Definition at line 76 of file manager-base.hpp.
Referenced by nfd::RibManager::enableLocalFields(), and nfd::FibManager::FibManager().
|
protected |
Definition at line 76 of file manager-base.hpp.
Referenced by nfd::CsManager::CsManager(), nfd::RibManager::enableLocalFields(), nfd::FibManager::FibManager(), registerNotificationStream(), and nfd::updateLinkServiceOptions().
|
protected |
Definition at line 76 of file manager-base.hpp.
Referenced by nfd::CsManager::CsManager(), nfd::RibManager::enableLocalFields(), nfd::FaceManager::FaceManager(), nfd::FibManager::FibManager(), and handleCommand().
|
protected |
Definition at line 76 of file manager-base.hpp.
Referenced by nfd::CsManager::CsManager(), nfd::RibManager::enableLocalFields(), nfd::FaceManager::FaceManager(), nfd::FibManager::FibManager(), nfd::makeCreateFaceResponse(), and nfd::updateLinkServiceOptions().
|
protected |
Definition at line 103 of file manager-base.hpp.
|
protected |
Definition at line 103 of file manager-base.hpp.
Referenced by nfd::RibManager::enableLocalFields(), and registerNotificationStream().
|
protected |
Definition at line 110 of file manager-base.hpp.