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

A generic holder class that manages objects of type T. More...

Inheritance diagram for TdjGenericHolder:
TdjLifeCycle ILifeCycle TdjWebComponentHolder TdjWebFilterHolder TdjWebComponentHolders TdjWebFilterHolders

Public Member Functions

 TdjGenericHolder (TInterfacedClass AClass)
 Constructor for creating an instance of the class.
Boolean IsStarted ()
Boolean IsStopped ()
 Start ()
 Starts the component.
 Stop ()
 Stops the component.

Public Attributes

string Name
Boolean Started
Boolean Stopped

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.
 DoStart ()
 Execute the custom start code.
 DoStop ()
 Execute the custom stop code.

Detailed Description

A generic holder class that manages objects of type T.

Template Parameters
TA type parameter constrained to TInterfacedObject.
Note
This class inherits from TdjLifeCycle.

Constructor & Destructor Documentation

◆ TdjGenericHolder()

TdjGenericHolder::TdjGenericHolder ( TInterfacedClass AClass)

Constructor for creating an instance of the class.

Parameters
AClassThe class type to be used for initialization.

References TdjGenericHolder().

Referenced by TdjGenericHolder().

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.

◆ DoStart()

TdjLifeCycle::DoStart ( )
protectedinherited

Execute the custom start code.

References Create(), Destroy(), IsStarted(), IsStopped(), and Stop().

◆ DoStop()

TdjLifeCycle::DoStop ( )
protectedinherited

Execute the custom stop code.

References Started, and Stopped.

◆ 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().

◆ 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

◆ Started

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by DoStop(), and Start().