Kea: http_control_socket.h Source File

| Kea 2.2.0

http_control_socket.h
Go to the documentation of this file.
1// Copyright (C) 2018-2021 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
9
10#ifndef HTTP_CONTROL_SOCKET_H
11#define HTTP_CONTROL_SOCKET_H
12
13#include <netconf/control_socket.h>
14
15namespace isc {
16namespace netconf {
17
23 class HttpControlSocket : public ControlSocketBase {
24public:
25
29 HttpControlSocket(CfgControlSocketPtr ctrl_sock);
30
32 virtual ~HttpControlSocket() = default;
33
41 virtual data::ConstElementPtr configGet(const std::string& service);
42
51 virtual data::ConstElementPtr configTest(data::ConstElementPtr config,
52 const std::string& service);
53
62 virtual data::ConstElementPtr configSet(data::ConstElementPtr config,
63 const std::string& service);
64
65private:
73 data::ConstElementPtr sendCommand(data::ConstElementPtr command);
74};
75
77 typedef boost::shared_ptr<HttpControlSocket> HttpControlSocketPtr;
78
83template <> ControlSocketBasePtr
84createControlSocket<CfgControlSocket::Type::HTTP>(CfgControlSocketPtr ctrl_sock);
85
86} // namespace netconf
87} // namespace isc
88
89#endif // HTTP_CONTROL_SOCKET_H
isc::netconf::ControlSocketBase
Base class for control socket communication.
Definition: control_socket.h:32
isc::netconf::HttpControlSocket
Class for control socket communication over HTTP socket.
Definition: http_control_socket.h:23
isc::netconf::HttpControlSocket::configSet
virtual data::ConstElementPtr configSet(data::ConstElementPtr config, const std::string &service)
Set configuration.
Definition: http_control_socket.cc:59
isc::netconf::HttpControlSocket::configGet
virtual data::ConstElementPtr configGet(const std::string &service)
Get configuration.
Definition: http_control_socket.cc:41
isc::netconf::HttpControlSocket::configTest
virtual data::ConstElementPtr configTest(data::ConstElementPtr config, const std::string &service)
Test configuration.
Definition: http_control_socket.cc:50
isc::netconf::HttpControlSocket::~HttpControlSocket
virtual ~HttpControlSocket()=default
Destructor (does nothing).
isc::netconf::HttpControlSocket::HttpControlSocket
HttpControlSocket(CfgControlSocketPtr ctrl_sock)
Constructor.
Definition: http_control_socket.cc:36
control_socket.h
Contains declarations for control socket communication.
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition: data.h:27
isc::netconf::ControlSocketBasePtr
boost::shared_ptr< ControlSocketBase > ControlSocketBasePtr
Type definition for the pointer to the ControlSocketBase.
Definition: control_socket.h:107
isc::netconf::CfgControlSocketPtr
boost::shared_ptr< CfgControlSocket > CfgControlSocketPtr
Defines a pointer for CfgControlSocket instances.
Definition: netconf_config.h:144
isc::netconf::HttpControlSocketPtr
boost::shared_ptr< HttpControlSocket > HttpControlSocketPtr
Type definition for the pointer to the HttpControlSocket.
Definition: http_control_socket.h:77
isc
Defines the logger used by the top-level component of kea-lfc.
Definition: agent_parser.cc:143