Kea 2.7.6
|
Specifies the interface for implementing custom factory classes used to create instances of HttpResponseCreator. More...
#include <response_creator_factory.h>
Public Member Functions | |
virtual | ~HttpResponseCreatorFactory () |
Virtual destructor. | |
virtual HttpResponseCreatorPtr | create () const =0 |
Returns an instance of the HttpResponseCreator. | |
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.
|
inlinevirtual |
Virtual destructor.
Definition at line 39 of file response_creator_factory.h.
|
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.
Implemented in isc::agent::CtrlAgentResponseCreatorFactory, isc::config::CmdResponseCreatorFactory, and isc::config::HttpCommandResponseCreatorFactory.