Daraja HTTP Framework 3.1.1-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 ()
 SetStarted (const Boolean Value)
 SetStopped (const Boolean Value)
 Start ()
 Starts the component.
 Stop ()
 Stops the component.

Public Attributes

TCriticalSection CS
Boolean FStopped
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.

◆ CheckStopped()

TdjLifeCycle::CheckStopped ( )
protectedinherited

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

References TdjLifeCycle().

◆ DoStart()

TdjLifeCycle::DoStart ( )
protectedinherited

Execute the custom start code.

References IsStarted(), IsStopped(), Start(), and Stop().

◆ DoStop()

TdjLifeCycle::DoStop ( )
protectedinherited

Execute the custom stop code.

References Create(), Destroy(), FStopped, SetStarted(), SetStopped(), Started, and Stopped.

◆ IsStarted()

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

Implements ILifeCycle.

References TdjLifeCycle().

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

◆ IsStopped()

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

Implements ILifeCycle.

References Create().

Referenced by DoStart().

◆ SetStarted()

TdjLifeCycle::SetStarted ( const Boolean Value)
inherited

Referenced by DoStop().

◆ SetStopped()

TdjLifeCycle::SetStopped ( const Boolean Value)
inherited

Referenced by DoStop().

◆ Start()

TdjLifeCycle::Start ( )
inherited

Starts the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStart().

◆ Stop()

TdjLifeCycle::Stop ( )
inherited

Stops the component.

Implements ILifeCycle.

References Stopped.

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

Member Data Documentation

◆ CS

TCriticalSection TdjLifeCycle::CS
inherited

Referenced by ~TdjLifeCycle().

◆ FStopped

Boolean TdjLifeCycle::FStopped
inherited

Referenced by ~TdjLifeCycle(), and DoStop().

◆ Name

string TdjGenericHolder::Name

◆ Started

Boolean TdjLifeCycle::Started
inherited

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by DoStop(), and Stop().