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

A generic holder class for managing instances of TdjWebFilter. More...

Inheritance diagram for TdjWebFilterHolder:
TdjGenericHolder TdjWebFilter TdjLifeCycle ILifeCycle TdjWebFilterHolders

Public Member Functions

 TdjWebFilterHolder (TdjWebFilterClass WebFilterClass)
 Constructor for creating an instance of TdjWebFilterHolder.
 ~TdjWebFilterHolder ()
 DoFilter (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const IWebFilterChain Chain)
 Executes the filter logic for the given server context, request, and response.
Boolean IsStarted ()
Boolean IsStopped ()
 SetContext (const IContext Context)
 Set the context.
 SetInitParameter (const string Key, const string Value)
 Set initialization parameter.
 Start ()
 Starts the component.
 Stop ()
 Stops the component.

Public Attributes

string Name
Boolean Started
Boolean Stopped
TdjWebFilter WebFilter
 The instance of the filter.
TdjWebFilterClass WebFilterClass
 The filter class.

Protected Member Functions

 CheckStarted ()
 Raises an exception if the lifecycle is in "started" state.
 CheckStopped ()
 Raises an exception if the lifecycle is in "stopped" state.

Detailed Description

A generic holder class for managing instances of TdjWebFilter.

This class is a specialization of TdjGenericHolder, designed to hold and manage objects of type TdjWebFilter.

Constructor & Destructor Documentation

◆ TdjWebFilterHolder()

TdjWebFilterHolder::TdjWebFilterHolder ( TdjWebFilterClass WebFilterClass)

Constructor for creating an instance of TdjWebFilterHolder.

Parameters
WebFilterClassThe class reference of type TdjWebFilterClass used to initialize the web filter holder.

Referenced by SetInitParameter().

◆ ~TdjWebFilterHolder()

TdjWebFilterHolder::~TdjWebFilterHolder ( )

Member Function Documentation

◆ CheckStarted()

TdjLifeCycle::CheckStarted ( )
protectedinherited

Raises an exception if the lifecycle is in "started" state.

References TdjLifeCycle().

◆ CheckStopped()

TdjLifeCycle::CheckStopped ( )
protectedinherited

Raises an exception if the lifecycle is in "stopped" state.

References TdjLifeCycle(), and Started.

◆ DoFilter()

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

Executes the filter logic for the given server context, request, and response.

Parameters
ContextThe server context in which the filter is executed.
RequestThe HTTP request being processed.
ResponseThe HTTP response to be sent back to the client.
ChainThe filter chain to pass control to the next filter in the chain.

Implements IWebFilter.

References WebFilterClass.

◆ IsStarted()

Boolean TdjLifeCycle::IsStarted ( )
inherited
Returns
True if component is started

Implements ILifeCycle.

References Create().

Referenced by DoStart(), and TdjWebComponentHandler::FindHolder().

◆ IsStopped()

Boolean TdjLifeCycle::IsStopped ( )
inherited
Returns
True if component is stopped

Implements ILifeCycle.

Referenced by DoStart().

◆ SetContext()

TdjWebFilterHolder::SetContext ( const IContext Context)

Set the context.

Parameters
Contextthe Web Filter context

References WebFilterClass.

◆ SetInitParameter()

TdjWebFilterHolder::SetInitParameter ( const string Key,
const string Value )

Set initialization parameter.

Parameters
Keyinit parameter name
Valueinit parameter value

References TdjWebFilterHolder().

◆ Start()

TdjLifeCycle::Start ( )
inherited

Starts the component.

Implements ILifeCycle.

References Stopped.

◆ Stop()

TdjLifeCycle::Stop ( )
inherited

Stops the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().

Member Data Documentation

◆ Name

string TdjGenericHolder::Name
inherited

◆ Started

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by DoStop(), and Start().

◆ WebFilter

TdjWebFilter TdjWebFilterHolder::WebFilter

The instance of the filter.

◆ WebFilterClass

TdjWebFilterClass TdjWebFilterHolder::WebFilterClass

The filter class.

Referenced by DoFilter(), and SetContext().