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

Holds a WebComponent and configuration data. More...

Inheritance diagram for TdjWebComponentHolder:
TdjGenericHolder TdjWebComponent TdjLifeCycle ILifeCycle TdjWebComponentHolders

Public Member Functions

 TdjWebComponentHolder (TdjWebComponentClass WebComponentClass)
 Constructor.
 ~TdjWebComponentHolder ()
 Destructor.
IContext GetContext ()
 Get the context.
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
TdjWebComponent WebComponent
 The instance of the Web Component.
TdjWebComponentClass WebComponentClass
 The Web Component Class.

Protected Member Functions

 CheckNotStarted ()
 Raises an exception if the lifecycle is already in "started" state.
 CheckNotStopped ()
 Raises an exception if the lifecycle is already in "stopped" state.

Detailed Description

Holds a WebComponent and configuration data.

Constructor & Destructor Documentation

◆ TdjWebComponentHolder()

TdjWebComponentHolder::TdjWebComponentHolder ( TdjWebComponentClass WebComponentClass)

Constructor.

Parameters
WebComponentClassthe Web Component class

Referenced by GetContext(), SetContext(), and SetInitParameter().

◆ ~TdjWebComponentHolder()

TdjWebComponentHolder::~TdjWebComponentHolder ( )

Destructor.

Member Function Documentation

◆ CheckNotStarted()

TdjLifeCycle::CheckNotStarted ( )
protectedinherited

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

References Started, and Stopped.

Referenced by TdjWebFilterHolders::TdjWebFilterHolders().

◆ CheckNotStopped()

TdjLifeCycle::CheckNotStopped ( )
protectedinherited

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

References TdjLifeCycle().

◆ GetContext()

IContext TdjWebComponentHolder::GetContext ( )

Get the context.

References TdjWebComponentHolder().

◆ IsStarted()

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

Implements ILifeCycle.

References TdjLifeCycle().

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

◆ IsStopped()

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

Implements ILifeCycle.

References Stopped.

Referenced by DoStop().

◆ SetContext()

TdjWebComponentHolder::SetContext ( const IContext Context)

Set the context.

Parameters
Contextthe context

References TdjWebComponentHolder(), and WebComponentClass.

◆ SetInitParameter()

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

Set initialization parameter.

Parameters
Keyinit parameter name (case-sensitive)
Valueinit parameter value
Exceptions
EWebComponentExceptionif the key is already set

References TdjWebComponentHolder().

◆ Start()

TdjLifeCycle::Start ( )
inherited

Starts the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStop().

◆ Stop()

TdjLifeCycle::Stop ( )
inherited

Stops the component.

Note
Unlike Start, a failure in the custom stop code is logged and swallowed rather than re-raised; the component is still marked stopped.

Implements ILifeCycle.

References Started.

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

Member Data Documentation

◆ Name

string TdjGenericHolder::Name
inherited

◆ Started

Boolean TdjLifeCycle::Started
inherited

Referenced by CheckNotStarted(), and Stop().

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by CheckNotStarted(), and IsStopped().

◆ WebComponent

TdjWebComponent TdjWebComponentHolder::WebComponent

The instance of the Web Component.

◆ WebComponentClass

TdjWebComponentClass TdjWebComponentHolder::WebComponentClass

The Web Component Class.

Referenced by SetContext().