Daraja Framework  1.2
HTTP server framework for Object Pascal
TdjHandlerList Class Reference

Iterates handler list and exits when the response code is set. More...

+ Inheritance diagram for TdjHandlerList:

Public Member Functions

 TdjHandlerList ()
 Constructor.
 
 Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response)
 Handle a HTTP request. More...
 
- Public Member Functions inherited from TdjHandlerCollection
 TdjHandlerCollection ()
 Create a TdjHandlerCollection.
 
 ~TdjHandlerCollection ()
 Destructor.
 
 Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response)
 Handle a HTTP request. More...
 
 DoStart ()
 Start the handler.
 
 DoStop ()
 Start the handler.
 
 AddHandler (const IHandler Handler)
 Add a handler. More...
 
 RemoveHandler (const IHandler Handler)
 Remove a handler. More...
 
- Public Member Functions inherited from TdjAbstractHandler
 TdjAbstractHandler ()
 Constructor.
 
 DoStart ()
 Start the handler.
 
 DoStop ()
 Start the handler.
 
 Handle (string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response)
 Handle a HTTP request. More...
 
- Public Member Functions inherited from TdjLifeCycle
 TdjLifeCycle ()
 Constructor.
 
 Start ()
 Start the handler. More...
 
 Stop ()
 Stop the handler. More...
 
Boolean IsStarted ()
 
Boolean IsStopped ()
 

Additional Inherited Members

- Public Attributes inherited from TdjLifeCycle
Boolean Started
 True if the state is "started". More...
 
Boolean Stopped
 True if the state is "stopped". More...
 
- Protected Member Functions inherited from TdjAbstractHandlerContainer
 AddHandler (const IHandler Handler)
 Add a handler. More...
 
 RemoveHandler (const IHandler Handler)
 Remove a handler. More...
 
- Protected Member Functions inherited from TdjLifeCycle
 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.
 
- Protected Attributes inherited from TdjHandlerCollection
TdjHandlers FHandlers
 The handler collection.
 

Detailed Description

Iterates handler list and exits when the response code is set.

If the response code is still -1, it returns 404

This extension of TdjHandlerCollection will call each contained handler in turn until either an exception is thrown or a positive response status is set.

Member Function Documentation

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

Handle a HTTP request.

Parameters
TargetRequest target
ContextHTTP server context
RequestHTTP request
ResponseHTTP response
Exceptions
EWebComponentExceptionif an exception occurs that interferes with the component's normal operation
See also
IHandler

References TdjHandlerCollection::FHandlers.