Kea: isc::config::HttpCommandMgrImpl Class Reference

| Kea 3.0.3-git

isc::config::HttpCommandMgrImpl Class Reference

Implementation of the `HttpCommandMgr`. More...

## Public Member Functions
| HttpCommandMgrImpl ()
| Constructor.
void | closeCommandSocket (HttpSocketInfoPtr info, bool remove)
| Close control socket.
void | closeCommandSockets (bool remove=true)
| Close control socket.
ConstHttpListenerPtr | getHttpListener (HttpSocketInfoPtr info) const
| Returns a const pointer to the HTTP listener.
void | openCommandSocket (const isc::data::ConstElementPtr config)
| Open http control socket using configuration.
void | openCommandSockets (const isc::data::ConstElementPtr config)
| Open http control sockets using configuration.

## Public Attributes
long | idle_timeout_
| Idle connection timeout.
IOServicePtr | io_service_
| Pointer to the IO service.
std::map< std::pair< IOAddress, uint16_t >, HttpSocketInfoPtr > | sockets_
| The HTTP/HTTPS socket data (configuration, listener, etc.).
long | timeout_
| Connection timeout.
bool | use_external_
| Use external sockets flag.

## Detailed Description

Implementation of the `HttpCommandMgr`.

Definition at line 31 of file http_command_mgr.cc.

## Constructor & Destructor Documentation

## ◆ HttpCommandMgrImpl()

isc::config::HttpCommandMgrImpl::HttpCommandMgrImpl | ( |  | ) |
| inline

Constructor.

Definition at line 35 of file http_command_mgr.cc.

References idle_timeout_, io_service_, timeout_, isc::config::TIMEOUT_AGENT_IDLE_CONNECTION_TIMEOUT, isc::config::TIMEOUT_AGENT_RECEIVE_COMMAND, and use_external_.

## Member Function Documentation

## ◆ closeCommandSocket()

void isc::config::HttpCommandMgrImpl::closeCommandSocket | ( | HttpSocketInfoPtr | info,
|  | bool | remove )

Close control socket.

Parameters

  info | Configuration information for the http control socket.
  remove | When true remove the listeners immediately.

Definition at line 238 of file http_command_mgr.cc.

References closeCommandSockets(), isc::config::command_logger, isc::config::HTTP_COMMAND_MGR_SERVICE_STOPPING, isc::db::info, io_service_, LOG_INFO, and sockets_.

Referenced by closeCommandSockets(), and openCommandSockets().

Here is the call graph for this function:

## ◆ closeCommandSockets()

void isc::config::HttpCommandMgrImpl::closeCommandSockets | ( | bool | remove = true | ) |

Close control socket.

Parameters

  remove | When true remove the listeners immediately.

Definition at line 268 of file http_command_mgr.cc.

References closeCommandSocket(), isc::data::copy(), and sockets_.

Referenced by closeCommandSocket().

Here is the call graph for this function:

## ◆ getHttpListener()

ConstHttpListenerPtr isc::config::HttpCommandMgrImpl::getHttpListener | ( | HttpSocketInfoPtr | info | ) | const

Returns a const pointer to the HTTP listener.

Parameters

  info | Configuration information for the http control socket.

Returns
  Const pointer to the currently used listener or null pointer if there is no listener.

Definition at line 276 of file http_command_mgr.cc.

References isc::db::info, and sockets_.

## ◆ openCommandSocket()

void isc::config::HttpCommandMgrImpl::openCommandSocket | ( | const isc::data::ConstElementPtr | config | ) |

Open http control socket using configuration.

Creates http/https listener, or reuses the existing one reapplying changes.

Parameters

  config | Configuration information for the http control socket.

Definition at line 119 of file http_command_mgr.cc.

References isc::config::command_logger, isc::config::HTTP_COMMAND_MGR_HTTP_SERVICE_REUSE_FAILED, isc::config::HTTP_COMMAND_MGR_HTTP_SERVICE_UPDATED, isc::config::HTTP_COMMAND_MGR_HTTPS_SERVICE_REUSE_FAILED, isc::config::HTTP_COMMAND_MGR_HTTPS_SERVICE_UPDATED, isc::config::HTTP_COMMAND_MGR_SERVICE_STARTED, idle_timeout_, io_service_, isc_throw, LOG_ERROR, LOG_INFO, isc::asiolink::SERVER, sockets_, timeout_, isc::asiolink::IOAddress::toText(), and use_external_.

Referenced by openCommandSockets().

Here is the call graph for this function:

## ◆ openCommandSockets()

void isc::config::HttpCommandMgrImpl::openCommandSockets | ( | const isc::data::ConstElementPtr | config | ) |

Open http control sockets using configuration.

Parameters

  config | Configuration information for the http control sockets.

Definition at line 90 of file http_command_mgr.cc.

References closeCommandSocket(), isc::data::copy(), isc_throw, Element::list, openCommandSocket(), and sockets_.

Here is the call graph for this function:

## Member Data Documentation

## ◆ idle_timeout_

long isc::config::HttpCommandMgrImpl::idle_timeout_

Idle connection timeout.

Definition at line 80 of file http_command_mgr.cc.

Referenced by HttpCommandMgrImpl(), and openCommandSocket().

## ◆ io_service_

IOServicePtr isc::config::HttpCommandMgrImpl::io_service_

Pointer to the IO service.

Definition at line 74 of file http_command_mgr.cc.

Referenced by HttpCommandMgrImpl(), closeCommandSocket(), and openCommandSocket().

## ◆ sockets_

std::map<std::pair<IOAddress, uint16_t>, HttpSocketInfoPtr> isc::config::HttpCommandMgrImpl::sockets_

The HTTP/HTTPS socket data (configuration, listener, etc.).

Definition at line 83 of file http_command_mgr.cc.

Referenced by closeCommandSocket(), closeCommandSockets(), getHttpListener(), openCommandSocket(), and openCommandSockets().

## ◆ timeout_

long isc::config::HttpCommandMgrImpl::timeout_

Connection timeout.

Definition at line 77 of file http_command_mgr.cc.

Referenced by HttpCommandMgrImpl(), and openCommandSocket().

## ◆ use_external_

bool isc::config::HttpCommandMgrImpl::use_external_

Use external sockets flag.

Definition at line 86 of file http_command_mgr.cc.

Referenced by HttpCommandMgrImpl(), and openCommandSocket().

The documentation for this class was generated from the following file:

- http_command_mgr.cc