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

Abstract LifeCycle implementation. More...

Inheritance diagram for TdjLifeCycle:
ILifeCycle TdjAbstractConnector TdjAbstractHandler TdjGenericHolder TdjHTTPConnector TdjAbstractHandlerContainer TdjWebComponentHandler TdjWebComponentHolder TdjWebFilterHolder TdjHandlerCollection TdjHandlerWrapper TdjWebComponentHolders TdjWebFilterHolders TdjHandlerList TdjContextHandler TdjServerBase TdjContextHandlerCollection TdjWebComponentContextHandler TdjServer TdjWebAppContext

Public Member Functions

 TdjLifeCycle ()
 ~TdjLifeCycle ()
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
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

Abstract LifeCycle implementation.

Constructor & Destructor Documentation

◆ TdjLifeCycle()

TdjLifeCycle::TdjLifeCycle ( )

Referenced by CheckStopped(), IsStarted(), and Start().

◆ ~TdjLifeCycle()

TdjLifeCycle::~TdjLifeCycle ( )

References CS, and FStopped.

Member Function Documentation

◆ CheckStarted()

TdjLifeCycle::CheckStarted ( )
protected

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

◆ CheckStopped()

TdjLifeCycle::CheckStopped ( )
protected

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

References TdjLifeCycle().

◆ DoStart()

TdjLifeCycle::DoStart ( )
protected

Execute the custom start code.

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

◆ DoStop()

TdjLifeCycle::DoStop ( )
protected

Execute the custom stop code.

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

◆ IsStarted()

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

Implements ILifeCycle.

References TdjLifeCycle().

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

◆ IsStopped()

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

Implements ILifeCycle.

References Create().

Referenced by DoStart().

◆ SetStarted()

TdjLifeCycle::SetStarted ( const Boolean Value)

Referenced by DoStop().

◆ SetStopped()

TdjLifeCycle::SetStopped ( const Boolean Value)

Referenced by DoStop().

◆ Start()

TdjLifeCycle::Start ( )

Starts the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStart().

◆ Stop()

TdjLifeCycle::Stop ( )

Stops the component.

Implements ILifeCycle.

References Stopped.

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

Member Data Documentation

◆ CS

TCriticalSection TdjLifeCycle::CS

Referenced by ~TdjLifeCycle().

◆ FStopped

Boolean TdjLifeCycle::FStopped

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

◆ Started

Boolean TdjLifeCycle::Started

◆ Stopped

Boolean TdjLifeCycle::Stopped

Referenced by DoStop(), and Stop().