![]() |
Kea
2.3.5-git
|
Represents a Control Socket. More...
#include <netconf_config.h>
Public Types | |
enum | Type { UNIX, HTTP, STDOUT } |
Defines the list of possible control socket types. More... | |
Public Member Functions | |
CfgControlSocket (Type type, const std::string &name, const isc::http::Url &url) | |
Constructor. More... | |
virtual | ~CfgControlSocket ()=default |
Destructor (doing nothing). More... | |
const std::string | getName () const |
Getter which returns the Unix socket name. More... | |
Type | getType () const |
Getter which returns the socket type. More... | |
const isc::http::Url | getUrl () const |
Getter which returns the HTTP server URL. More... | |
isc::data::ElementPtr | toElement () const override final |
Unparse a configuration object. More... | |
![]() | |
void | contextToElement (data::ElementPtr map) const |
Merge unparse a user_context object. More... | |
data::ConstElementPtr | getContext () const |
Returns const pointer to the user context. More... | |
void | setContext (const data::ConstElementPtr &ctx) |
Sets user context. More... | |
![]() | |
virtual | ~CfgToElement () |
Destructor. More... | |
Static Public Member Functions | |
static Type | stringToType (const std::string &type) |
Converts socket type name to CfgControlSocket::Type. More... | |
static const std::string | typeToString (CfgControlSocket::Type type) |
Converts CfgControlSocket::Type to string. More... | |
![]() | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. More... | |
Additional Inherited Members | |
![]() | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) More... | |
Represents a Control Socket.
Acts as a storage class containing the basic attributes which describe a Control Socket.
Definition at line 70 of file netconf_config.h.
Defines the list of possible control socket types.
Enumerator | |
---|---|
UNIX | |
HTTP | |
STDOUT |
Definition at line 74 of file netconf_config.h.
isc::netconf::CfgControlSocket::CfgControlSocket | ( | Type | type, |
const std::string & | name, | ||
const isc::http::Url & | url | ||
) |
Constructor.
type | The socket type. |
name | The Unix socket name. |
url | The HTTP server URL. |
Definition at line 27 of file netconf_config.cc.
|
virtualdefault |
Destructor (doing nothing).
|
inline |
Getter which returns the Unix socket name.
Definition at line 101 of file netconf_config.h.
|
inline |
Getter which returns the socket type.
Definition at line 94 of file netconf_config.h.
|
inline |
Getter which returns the HTTP server URL.
Definition at line 108 of file netconf_config.h.
References stringToType(), toElement(), and typeToString().
|
static |
Converts socket type name to CfgControlSocket::Type.
type | The type name. Currently supported values are "unix", "http" and "stdout". |
BadValue | if the type name isn't recognized. |
Definition at line 33 of file netconf_config.cc.
Referenced by getUrl(), and isc::netconf::ControlSocketConfigParser::parse().
|
finaloverridevirtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 60 of file netconf_config.cc.
References isc::data::UserContext::contextToElement(), isc::http::Url::toText(), and typeToString().
Referenced by getUrl(), and isc::netconf::CfgServer::setValidateChanges().
|
static |
Converts CfgControlSocket::Type to string.
type | The CfgControlSocket::Type type. |
Definition at line 46 of file netconf_config.cc.
Referenced by getUrl(), and toElement().