Kea: http_command_mgr.h Source File

| Kea 3.0.2-git

http_command_mgr.h
Go to the documentation of this file.
1// Copyright (C) 2024-2025 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
7#ifndef HTTP_COMMAND_MGR_H
8#define HTTP_COMMAND_MGR_H
9
10#include <asiolink/io_service.h>
11#include <config/http_command_config.h>
12#include <boost/noncopyable.hpp>
13
14namespace isc {
15namespace config {
16
18class HttpCommandMgrImpl;
19
23 class HttpCommandMgr : public boost::noncopyable {
24public:
25
30 static HttpCommandMgr& instance();
31
37 void setIOService(const asiolink::IOServicePtr& io_service);
38
42 void setConnectionTimeout(const long timeout);
43
47 void setIdleConnectionTimeout(const long timeout);
48
55 void addExternalSockets(bool use_external = true);
56
60 void openCommandSockets(const isc::data::ConstElementPtr config);
61
71 void openCommandSocket(const isc::data::ConstElementPtr config);
72
80 void closeCommandSocket(HttpSocketInfoPtr info = HttpSocketInfoPtr(), bool remove = true);
81
83 void closeCommandSockets();
84
91 isc::http::ConstHttpListenerPtr getHttpListener(HttpSocketInfoPtr info = HttpSocketInfoPtr()) const;
92
93private:
94
96 HttpCommandMgr();
97
99 boost::shared_ptr<HttpCommandMgrImpl> impl_;
100};
101
102} // end of isc::config namespace
103} // end of isc namespace
104#endif
isc::config::HttpCommandMgrImpl
Implementation of the HttpCommandMgr.
Definition http_command_mgr.cc:31
isc::config::HttpCommandMgr::openCommandSocket
void openCommandSocket(const isc::data::ConstElementPtr config)
Open http control socket using configuration.
Definition http_command_mgr.cc:319
isc::config::HttpCommandMgr::setIdleConnectionTimeout
void setIdleConnectionTimeout(const long timeout)
Override default idle connection timeout.
Definition http_command_mgr.cc:309
isc::config::HttpCommandMgr::getHttpListener
isc::http::ConstHttpListenerPtr getHttpListener(HttpSocketInfoPtr info=HttpSocketInfoPtr()) const
Returns a const pointer to the HTTP listener.
Definition http_command_mgr.cc:339
isc::config::HttpCommandMgr::closeCommandSockets
void closeCommandSockets()
Close http control sockets.
Definition http_command_mgr.cc:334
isc::config::HttpCommandMgr::setConnectionTimeout
void setConnectionTimeout(const long timeout)
Override default connection timeout.
Definition http_command_mgr.cc:304
isc::config::HttpCommandMgr::addExternalSockets
void addExternalSockets(bool use_external=true)
Use external sockets flag.
Definition http_command_mgr.cc:314
isc::config::HttpCommandMgr::instance
static HttpCommandMgr & instance()
HttpCommandMgr is a singleton class.
Definition http_command_mgr.cc:290
isc::config::HttpCommandMgr::setIOService
void setIOService(const asiolink::IOServicePtr &io_service)
Sets IO service to be used by the http command manager.
Definition http_command_mgr.cc:299
isc::config::HttpCommandMgr::openCommandSockets
void openCommandSockets(const isc::data::ConstElementPtr config)
Open http control sockets using configuration.
Definition http_command_mgr.cc:324
isc::config::HttpCommandMgr::closeCommandSocket
void closeCommandSocket(HttpSocketInfoPtr info=HttpSocketInfoPtr(), bool remove=true)
Close http control socket.
Definition http_command_mgr.cc:329
http_command_config.h
io_service.h
isc::asiolink::IOServicePtr
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
Definition io_service.h:28
isc::config
Definition command_interpreter.cc:23
isc::config::HttpSocketInfoPtr
boost::shared_ptr< HttpSocketInfo > HttpSocketInfoPtr
Pointer to a HttpSocketInfo object.
Definition http_command_config.h:256
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:29
isc::http::ConstHttpListenerPtr
boost::shared_ptr< const HttpListener > ConstHttpListenerPtr
Pointer to the const HttpListener.
Definition listener.h:159
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148