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

Holds a WebComponent (class reference) and configuration info. More...

+ Inheritance diagram for TdjWebComponentHolder:

Public Member Functions

 TdjWebComponentHolder (const TdjWebComponentClass WebComponentClass)
 Constructor. More...
 
 ~TdjWebComponentHolder ()
 Destructor.
 
IContext GetContext ()
 Get the context.
 
 SetContext (const IContext Context)
 Set the context. More...
 
 SetInitParameter (const string Key, const string Value)
 Set initialization parameter. More...
 
 DoStart ()
 Start the handler.
 
 DoStop ()
 Stop the handler.
 
- Public Member Functions inherited from TdjGenericHolder
 TdjGenericHolder (const TInterfacedClass AClass)
 Create a TdjGenericHolder.
 
- Public Member Functions inherited from TdjLifeCycle
 TdjLifeCycle ()
 Constructor.
 
 Start ()
 Start the handler. More...
 
 Stop ()
 Stop the handler. More...
 
Boolean IsStarted ()
 
Boolean IsStopped ()
 

Public Attributes

TdjWebComponentClass WebComponentClass
 The Web Component Class. More...
 
TdjWebComponent WebComponent
 The instance of the Web Component. More...
 
- Public Attributes inherited from TdjGenericHolder
string Name
 
- Public Attributes inherited from TdjLifeCycle
Boolean Started
 True if the state is "started". More...
 
Boolean Stopped
 True if the state is "stopped". More...
 

Additional Inherited Members

- Protected Member Functions inherited from TdjLifeCycle
 DoStart ()
 Execute the custom start code.
 
 DoStop ()
 Execute the custom stop code.
 
 CheckStarted ()
 Raises an exception if the lifecycle is in "started" state.
 
 CheckStopped ()
 Raises an exception if the lifecycle is in "stopped" state.
 

Detailed Description

Holds a WebComponent (class reference) and configuration info.

A WebComponent instance will be created 'on the fly' when the WebComponent property is accessed. (lazy instantiation).

Constructor & Destructor Documentation

Member Function Documentation

TdjWebComponentHolder::SetContext ( const IContext  Context)

Set the context.

Parameters
Contextthe context

Referenced by TdjWebComponentContextHandler::AddWebComponent(), and TdjWebComponentHolder().

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

Set initialization parameter.

Parameters
Keyinit parameter name
Valueinit parameter value

Referenced by TdjWebComponentHolder().

Member Data Documentation

TdjWebComponent TdjWebComponentHolder::WebComponent

The instance of the Web Component.

See also
GetWebComponent For reading

Referenced by TdjWebComponentHandler::TdjWebComponentHandler(), and TdjWebComponentHolder().

TdjWebComponentClass TdjWebComponentHolder::WebComponentClass

The Web Component Class.

See also
GetClass For reading

Referenced by TdjWebComponentContextHandler::AddWebComponent(), and TdjWebComponentHolder().