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

Handles requests within a specific context path. More...

Inheritance diagram for TdjContext:
IContext

Public Member Functions

 TdjContext (const string ContextPath)
 Initializes a new context with the specified path.

Protected Member Functions

 Add (const string Key, const string Value)
IContextConfig GetContextConfig ()
 Get the context configuration.
string GetContextPath ()
 Get the context path.
string GetInitParameter (const string Key)
 Gets the value of an initialization parameter.
TdjStringArray GetInitParameterNames ()
 Gets all initialization parameter names.
 Log (const string Msg)
 Logs a message to the configured logging system.
 SetContext (const IContext Context)
 SetName (const string AName)

Detailed Description

Handles requests within a specific context path.

Manages initialization parameters and context configuration.

Constructor & Destructor Documentation

◆ TdjContext()

TdjContext::TdjContext ( const string ContextPath)

Initializes a new context with the specified path.

Parameters
ContextPathThe path for this context.
Exceptions
EWebComponentExceptionIf the context path contains invalid characters.

Member Function Documentation

◆ Add()

TdjContext::Add ( const string Key,
const string Value )
protected

◆ GetContextConfig()

IContextConfig TdjContext::GetContextConfig ( )
protected

Get the context configuration.

Returns
the context configuration

Implements IContext.

◆ GetContextPath()

string TdjContext::GetContextPath ( )
protected

Get the context path.

Returns
the context path.

Implements IContext.

◆ GetInitParameter()

string TdjContext::GetInitParameter ( const string Key)
protected

Gets the value of an initialization parameter.

Parameters
KeyThe parameter name. Parameter names are case-sensitive.
Returns
The parameter value or empty string if not found.

Implements IContext.

◆ GetInitParameterNames()

TdjStringArray TdjContext::GetInitParameterNames ( )
protected

Gets all initialization parameter names.

Note
The order of the names is unspecified.
Returns
An array containing all parameter names.

Implements IContext.

◆ Log()

TdjContext::Log ( const string Msg)
protected

Logs a message to the configured logging system.

Parameters
MsgThe message to log.

Implements IContext.

◆ SetContext()

TdjContext::SetContext ( const IContext Context)
protected

◆ SetName()

TdjContext::SetName ( const string AName)
protected