Daraja HTTP Framework  2.0
HTTP server framework for Object Pascal
TdjLifeCycle Class Reference

Abstract LifeCycle implementation. More...

+ Inheritance diagram for TdjLifeCycle:

Public Member Functions

 TdjLifeCycle ()
 Constructor.
 
 Start ()
 Start the handler. More...
 
 Stop ()
 Stop the handler. More...
 
Boolean IsStarted ()
 
Boolean IsStopped ()
 

Public Attributes

Boolean Started
 True if the state is "started". More...
 
Boolean Stopped
 True if the state is "stopped". More...
 

Protected Member Functions

 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

Abstract LifeCycle implementation.

Member Function Documentation

◆ IsStarted()

Boolean TdjLifeCycle::IsStarted ( )

◆ IsStopped()

Boolean TdjLifeCycle::IsStopped ( )
Returns
True if the state is "stopped"

◆ Start()

TdjLifeCycle::Start ( )

Start the handler.

See also
ILifeCycle

References DoStart(), IsStarted(), and Started.

◆ Stop()

TdjLifeCycle::Stop ( )

Stop the handler.

See also
ILifeCycle

References DoStop(), and Stopped.

Referenced by TdjHTTPConnector::~TdjHTTPConnector(), and TdjServer::~TdjServer().

Member Data Documentation

◆ Started

Boolean TdjLifeCycle::Started

True if the state is "started".

See also
FStarted For reading
SetStarted For writing

Referenced by TdjHandlerCollection::AddHandler(), CheckStarted(), TdjHTTPConnector::DoStart(), and Start().

◆ Stopped

Boolean TdjLifeCycle::Stopped

True if the state is "stopped".

See also
FStopped For reading
SetStopped For writing

Referenced by CheckStopped(), and Stop().