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

Multiple contexts with the same name are not allowed. More...

Inheritance diagram for TdjContextHandlerCollection:
TdjHandlerList TdjHandlerCollection TdjAbstractHandlerContainer TdjAbstractHandler IHandlerContainer TdjLifeCycle IHandler ILifeCycle

Public Member Functions

 TdjContextHandlerCollection ()
 Create a collection of context handlers.
 ~TdjContextHandlerCollection ()
 Destructor.
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

 AddHandler (const IHandler Handler)
 Adds a handler to this container.
 CheckStarted ()
 Raises an exception if the lifecycle is in "started" state.
 CheckStopped ()
 Raises an exception if the lifecycle is in "stopped" state.
 Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response)
 Handles an HTTP request.
 RemoveHandler (const IHandler Handler)
 Removes a handler from this container.

Protected Attributes

TdjHandlers FHandlers
 The handler collection.

Detailed Description

Multiple contexts with the same name are not allowed.

Constructor & Destructor Documentation

◆ TdjContextHandlerCollection()

TdjContextHandlerCollection::TdjContextHandlerCollection ( )

Create a collection of context handlers.

◆ ~TdjContextHandlerCollection()

TdjContextHandlerCollection::~TdjContextHandlerCollection ( )

Destructor.

Member Function Documentation

◆ AddHandler()

TdjHandlerCollection::AddHandler ( const IHandler Handler)
protectedinherited

Adds a handler to this container.

Parameters
HandlerHandler to add

Implements IHandlerContainer.

References TdjHandlerCollection().

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

◆ Handle()

TdjHandlerList::Handle ( const string Target,
TdjServerContext Context,
TdjRequest Request,
TdjResponse Response )
protectedinherited

Handles an HTTP request.

Parameters
TargetTarget path or resource identifier
ContextServer context for this request
RequestHTTP request object
ResponseHTTP response object to populate
Exceptions
EWebComponentExceptionif an exception occurs that interferes with the component's normal operation.

Implements IHandler.

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

◆ RemoveHandler()

TdjHandlerCollection::RemoveHandler ( const IHandler Handler)
protectedinherited

Removes a handler from this container.

Parameters
HandlerHandler to remove

Implements IHandlerContainer.

References Create().

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

◆ FHandlers

TdjHandlers TdjHandlerCollection::FHandlers
protectedinherited

The handler collection.

Referenced by TdjHandlerCollection(), and ~TdjHandlerCollection().

◆ FStopped

Boolean TdjLifeCycle::FStopped
inherited

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

◆ Started

Boolean TdjLifeCycle::Started
inherited

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by DoStop(), and Stop().