Kea 2.6.0
isc::agent::CtrlAgentResponseCreator Class Reference

Concrete implementation of the HTTP response creator used by the Control Agent. More...

#include <ca_response_creator.h>

+ Inheritance diagram for isc::agent::CtrlAgentResponseCreator:

Public Member Functions

virtual http::HttpRequestPtr createNewHttpRequest () const
 Create a new request.
virtual http::HttpResponsePtr createStockHttpResponse (const http::HttpRequestPtr &request, const http::HttpStatusCode &status_code) const
 Creates stock HTTP response.
- Public Member Functions inherited from isc::http::HttpResponseCreator
virtual ~HttpResponseCreator ()
virtual HttpResponsePtr createHttpResponse (HttpRequestPtr request) final
 Create HTTP response from HTTP request received.
virtual HttpRequestPtr createNewHttpRequest () const =0
 Create a new request.
virtual HttpResponsePtr createStockHttpResponse (const HttpRequestPtr &request, const HttpStatusCode &status_code) const =0
 Creates implementation specific HTTP response.

Additional Inherited Members

virtual HttpResponsePtr createDynamicHttpResponse (HttpRequestPtr request)=0
 Creates implementation specific HTTP response.

Detailed Description

Concrete implementation of the HTTP response creator used by the Control Agent.

See the documentation of the isc::http::HttpResponseCreator for the basic information how HTTP response creators are utilized by the libkea-http library to generate HTTP responses.

This creator expects that received requests are encapsulated in the isc::http::PostHttpRequestJson objects. The generated responses are encapsulated in the HttpResponseJson objects.

This class uses CtrlAgentCommandMgr singleton to process commands conveyed in the HTTP body. The JSON responses returned by the manager are placed in the body of the generated HTTP responses.

Definition at line 36 of file ca_response_creator.h.

Member Function Documentation

◆ createNewHttpRequest()

HttpRequestPtr isc::agent::CtrlAgentResponseCreator::createNewHttpRequest ( ) const

Create a new request.

This method creates a bare instance of the isc::http::PostHttpRequestJson.

Pointer to the new instance of the isc::http::PostHttpRequestJson.

Implements isc::http::HttpResponseCreator.

Definition at line 53 of file

◆ createStockHttpResponse()

HttpResponsePtr isc::agent::CtrlAgentResponseCreator::createStockHttpResponse ( const http::HttpRequestPtr request,
const http::HttpStatusCode status_code 
) const

Creates stock HTTP response.

requestPointer to an object representing HTTP request.
status_codeStatus code of the response.
Pointer to an isc::http::HttpResponseJson object representing stock HTTP response.

Implements isc::http::HttpResponseCreator.

Definition at line 58 of file

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