Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
Loading...
Searching...
No Matches
TdjGenericWebFilter Class Reference

A generic web filter class implementing the IWebFilter interface. More...

Inheritance diagram for TdjGenericWebFilter:
IWebFilter TdjWebFilter TdjWebFilterHolder TdjWebFilterHolders

Public Member Functions

 TdjGenericWebFilter ()
 Constructor.
 ~TdjGenericWebFilter ()
 Destructor.
 DestroyFilter ()
 Called when filter is being removed from service.
 DoFilter (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const IWebFilterChain Chain)
 The DoFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.
IWebFilterConfig GetWebFilterConfig ()
 Returns the configuration for this filter.
 Init ()
 A convenience method which can be overridden so that there is no need to call inherited Init(config).
 Init (const IWebFilterConfig Config)
 Called by the container on startup.

Public Attributes

IWebFilterConfig Config

Detailed Description

A generic web filter class implementing the IWebFilter interface.

This class provides functionality to filter web requests or responses as part of the Daraja framework.

Constructor & Destructor Documentation

◆ TdjGenericWebFilter()

TdjGenericWebFilter::TdjGenericWebFilter ( )

Constructor.

References TdjGenericWebFilter().

Referenced by TdjGenericWebFilter(), and ~TdjGenericWebFilter().

◆ ~TdjGenericWebFilter()

TdjGenericWebFilter::~TdjGenericWebFilter ( )

Destructor.

References TdjGenericWebFilter().

Member Function Documentation

◆ DestroyFilter()

TdjGenericWebFilter::DestroyFilter ( )

Called when filter is being removed from service.

Note
This method can be overridden in descendant classes to implement custom cleanup logic for the filter.

Implements IWebFilter.

◆ DoFilter()

TdjGenericWebFilter::DoFilter ( TdjServerContext Context,
TdjRequest Request,
TdjResponse Response,
const IWebFilterChain Chain )

The DoFilter method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.

Parameters
ContextThe server context for this request
RequestThe HTTP request being processed
ResponseThe HTTP response being generated
ChainThe filter chain to pass the request/response to

Implements IWebFilter.

◆ GetWebFilterConfig()

IWebFilterConfig TdjGenericWebFilter::GetWebFilterConfig ( )

Returns the configuration for this filter.

Returns
The filter configuration object
Exceptions
EWebComponentExceptionif the filter is not initialized

◆ Init() [1/2]

TdjGenericWebFilter::Init ( )

A convenience method which can be overridden so that there is no need to call inherited Init(config).

◆ Init() [2/2]

TdjGenericWebFilter::Init ( const IWebFilterConfig Config)

Called by the container on startup.

Note
if this method is overridden, the overriding code must also call inherited Init.
Parameters
Configthe configuration
Exceptions
EWebComponentExceptionif initialization failed

Implements IWebFilter.

Member Data Documentation

◆ Config

IWebFilterConfig TdjGenericWebFilter::Config