Kea: http_command_mgr.h Source File

| Kea 3.2.0-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:317
isc::config::HttpCommandMgr::setIdleConnectionTimeout
void setIdleConnectionTimeout(const long timeout)
Override default idle connection timeout.
Definition http_command_mgr.cc:307
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:337
isc::config::HttpCommandMgr::closeCommandSockets
void closeCommandSockets()
Close http control sockets.
Definition http_command_mgr.cc:332
isc::config::HttpCommandMgr::setConnectionTimeout
void setConnectionTimeout(const long timeout)
Override default connection timeout.
Definition http_command_mgr.cc:302
isc::config::HttpCommandMgr::addExternalSockets
void addExternalSockets(bool use_external=true)
Use external sockets flag.
Definition http_command_mgr.cc:312
isc::config::HttpCommandMgr::instance
static HttpCommandMgr & instance()
HttpCommandMgr is a singleton class.
Definition http_command_mgr.cc:288
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:297
isc::config::HttpCommandMgr::openCommandSockets
void openCommandSockets(const isc::data::ConstElementPtr config)
Open http control sockets using configuration.
Definition http_command_mgr.cc:322
isc::config::HttpCommandMgr::closeCommandSocket
void closeCommandSocket(HttpSocketInfoPtr info=HttpSocketInfoPtr(), bool remove=true)
Close http control socket.
Definition http_command_mgr.cc:327
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:35
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:249
isc::data::ConstElementPtr
boost::shared_ptr< const Element > ConstElementPtr
Definition data.h:30
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 check_exists_add.cc:18