Daraja Framework  1.2
HTTP server framework for Object Pascal
TdjContext Class Reference

Context implementation. More...

+ Inheritance diagram for TdjContext:

Public Member Functions

 TdjContext (const string ContextPath)
 Create a context with the given path. More...
 
 Init (const IContextConfig Config)
 Called by the container on start. More...
 
IContextConfig GetContextConfig ()
 Get the context configuration. More...
 
string GetContextPath ()
 Get the context path. More...
 
string GetInitParameter (const string Key)
 Get the init parameter with the given name. More...
 
TdjStrings GetInitParameterNames ()
 Get the list of init parameter names. More...
 
 Log (const string Msg)
 Write a log message. More...
 

Detailed Description

Context implementation.

Constructor & Destructor Documentation

TdjContext::TdjContext ( const string  ContextPath)

Create a context with the given path.

Parameters
ContextPaththe context path
Exceptions
EWebComponentExceptionif the conext name contains invalid characters

Member Function Documentation

IContextConfig TdjContext::GetContextConfig ( )

Get the context configuration.

Returns
the context configuration
string TdjContext::GetContextPath ( )

Get the context path.

Returns
the context path.
string TdjContext::GetInitParameter ( const string  Key)

Get the init parameter with the given name.

Parameters
Keythe parameter name
Returns
the init parameter value
TdjStrings TdjContext::GetInitParameterNames ( )

Get the list of init parameter names.

Returns
list of init parameter names.
TdjContext::Init ( const IContextConfig  Config)

Called by the container on start.

Parameters
Configthe context configuration
TdjContext::Log ( const string  Msg)

Write a log message.

Note
if DARAJA_LOGGING is defined, it will write using the logging framework. Otherwise, it will log to console if System.IsConsole is True.
Parameters
Msgthe log message.