Kea 2.7.6
isc::http::HttpResponseCreatorFactory Class Referenceabstract

Specifies the interface for implementing custom factory classes used to create instances of HttpResponseCreator. More...

#include <response_creator_factory.h>

+ Inheritance diagram for isc::http::HttpResponseCreatorFactory:

Public Member Functions

virtual ~HttpResponseCreatorFactory ()
 Virtual destructor.
 
virtual HttpResponseCreatorPtr create () const =0
 Returns an instance of the HttpResponseCreator.
 

Detailed Description

Specifies the interface for implementing custom factory classes used to create instances of HttpResponseCreator.

The HttpResponseCreator defines an interface for the classes used to generate HTTP responses. Such classes are defined outside of this library and they are specific to the needs of the particular module. In some cases it may be desired to create new instance of the HttpResponseCreator implementation for every request processed. The HttpResponseCreatorFactory is an interface to the "factory" class which generates canned HttpResponseCreator instances. The pointer to the factory class is passed to the HttpListener and the listener propagates it down to other classes. These classes call HttpResponseCreatorFactory::create to retrieve an instance of the appropriate HttpResponseCreator, which is in turn used to generate HTTP response.

Note that an implementation of the HttpResponseCreatorFactory::create may always return the same instance of the HttpResponseCreator if creating new instance for each request is not required or undesired.

Definition at line 35 of file response_creator_factory.h.

Constructor & Destructor Documentation

◆ ~HttpResponseCreatorFactory()

virtual isc::http::HttpResponseCreatorFactory::~HttpResponseCreatorFactory ( )
inlinevirtual

Virtual destructor.

Definition at line 39 of file response_creator_factory.h.

Member Function Documentation

◆ create()

virtual HttpResponseCreatorPtr isc::http::HttpResponseCreatorFactory::create ( ) const
pure virtual

Returns an instance of the HttpResponseCreator.

The implementation may create new instance every time this method is called, or it may always return the same instance.

Returns
Pointer to the instance of the HttpResponseCreator to be used to generate HTTP response.

Implemented in isc::agent::CtrlAgentResponseCreatorFactory, isc::config::CmdResponseCreatorFactory, and isc::config::HttpCommandResponseCreatorFactory.


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