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

Interface for web filters that can intercept and modify HTTP requests and responses. More...

Inheritance diagram for IWebFilter:
TdjGenericWebFilter TdjWebFilter TdjWebFilterHolder TdjWebFilterHolders

Public Member Functions

 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.
 Init (const IWebFilterConfig Config)
 Called by the container on startup.

Detailed Description

Interface for web filters that can intercept and modify HTTP requests and responses.

Member Function Documentation

◆ DestroyFilter()

IWebFilter::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.

Implemented in TdjGenericWebFilter.

◆ DoFilter()

IWebFilter::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

Implemented in TdjGenericWebFilter, and TdjWebFilterHolder.

◆ Init()

IWebFilter::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

Implemented in TdjGenericWebFilter.