Kea: isc::config::HttpCommandMgr Class Reference

| Kea 3.0.0

isc::config::HttpCommandMgr Class Reference

HTTP Commands Manager implementation for the Kea servers. More...

`#include <http_command_mgr.h>`

Inheritance diagram for isc::config::HttpCommandMgr:
[legend]

## Public Member Functions
void | addExternalSockets (bool use_external=true)
| Use external sockets flag.
void | closeCommandSocket (HttpSocketInfoPtr info=HttpSocketInfoPtr(), bool remove=true)
| Close http control socket.
void | closeCommandSockets ()
| Close http control sockets.
isc::http::ConstHttpListenerPtr | getHttpListener (HttpSocketInfoPtr info=HttpSocketInfoPtr()) 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.
void | setConnectionTimeout (const long timeout)
| Override default connection timeout.
void | setIdleConnectionTimeout (const long timeout)
| Override default idle connection timeout.
void | setIOService (const asiolink::IOServicePtr &io_service)
| Sets IO service to be used by the http command manager.

## Static Public Member Functions
static HttpCommandMgr & | instance ()
| HttpCommandMgr is a singleton class.

## Detailed Description

HTTP Commands Manager implementation for the Kea servers.

Similar to `UnixCommandMgr` but using HTTP/HTTPS instead of UNIX sockets.

Definition at line 23 of file http_command_mgr.h.

## Member Function Documentation

## ◆ addExternalSockets()

void isc::config::HttpCommandMgr::addExternalSockets | ( | bool | use_external = true | ) |

Use external sockets flag.

Add sockets as external sockets of the interface manager so available I/O on them makes a waiting select to return.

Parameters

  use_external | True (default) add external sockets.

Definition at line 314 of file http_command_mgr.cc.

Referenced by isc::d2::D2Process::init().

## ◆ closeCommandSocket()

void isc::config::HttpCommandMgr::closeCommandSocket | ( | HttpSocketInfoPtr | info = HttpSocketInfoPtr(),
|  | bool | remove = true )

Close http control socket.

Note
  This function in used internally by closeCommandSockets and it should not be used directly, except for unit tests.

Parameters

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

Definition at line 329 of file http_command_mgr.cc.

References isc::db::info.

## ◆ closeCommandSockets()

void isc::config::HttpCommandMgr::closeCommandSockets | ( |  | ) |

Close http control sockets.

Definition at line 334 of file http_command_mgr.cc.

Referenced by isc::dhcp::ControlledDhcpv4Srv::~ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::~ControlledDhcpv6Srv(), isc::dhcp::configureCommandChannel(), isc::d2::D2Controller::deregisterCommands(), and isc::d2::D2Process::reconfigureCommandChannel().

## ◆ getHttpListener()

ConstHttpListenerPtr isc::config::HttpCommandMgr::getHttpListener | ( | HttpSocketInfoPtr | info = HttpSocketInfoPtr() | ) | 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 339 of file http_command_mgr.cc.

References isc::db::info.

## ◆ instance()

HttpCommandMgr & isc::config::HttpCommandMgr::instance | ( |  | ) |
| static

HttpCommandMgr is a singleton class.

This method returns reference to its sole instance.

Returns
  The only existing instance of the manager.

Definition at line 290 of file http_command_mgr.cc.

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), isc::dhcp::ControlledDhcpv4Srv::~ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::~ControlledDhcpv6Srv(), isc::dhcp::configureCommandChannel(), isc::d2::D2Controller::deregisterCommands(), isc::d2::D2Process::init(), and isc::d2::D2Process::reconfigureCommandChannel().

## ◆ openCommandSocket()

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

Open http control socket using configuration.

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

Note
  This function in used internally by openCommandSockets and it should not be used directly, except for unit tests.

Parameters

  config | Configuration information for the http control socket.

Definition at line 319 of file http_command_mgr.cc.

## ◆ openCommandSockets()

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

Open http control sockets using configuration.

Parameters

  config | Configuration information for the http control sockets.

Definition at line 324 of file http_command_mgr.cc.

Referenced by isc::dhcp::configureCommandChannel(), and isc::d2::D2Process::reconfigureCommandChannel().

## ◆ setConnectionTimeout()

void isc::config::HttpCommandMgr::setConnectionTimeout | ( | const long | timeout | ) |

Override default connection timeout.

Parameters

  timeout | New connection timeout in milliseconds.

Definition at line 304 of file http_command_mgr.cc.

## ◆ setIdleConnectionTimeout()

void isc::config::HttpCommandMgr::setIdleConnectionTimeout | ( | const long | timeout | ) |

Override default idle connection timeout.

Parameters

  timeout | New connection timeout in milliseconds.

Definition at line 309 of file http_command_mgr.cc.

## ◆ setIOService()

void isc::config::HttpCommandMgr::setIOService | ( | const asiolink::IOServicePtr & | io_service | ) |

Sets IO service to be used by the http command manager.

The server should use this method to provide the Command Manager with the common IO service used by the server.

Parameters

  io_service | Pointer to the IO service.

Definition at line 299 of file http_command_mgr.cc.

Referenced by isc::dhcp::ControlledDhcpv4Srv::ControlledDhcpv4Srv(), isc::dhcp::ControlledDhcpv6Srv::ControlledDhcpv6Srv(), and isc::d2::D2Process::init().

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

- http_command_mgr.h
- http_command_mgr.cc