Daraja HTTP Framework 2.8
HTTP server framework for Object Pascal
|
A collection of handlers. More...
Public Member Functions | |
TdjHandlerCollection () | |
Create a TdjHandlerCollection. | |
~TdjHandlerCollection () | |
Destructor. | |
Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. | |
DoStart () | |
Start the handler. | |
DoStop () | |
Start the handler. | |
AddHandler (const IHandler Handler) | |
Add a handler. | |
RemoveHandler (const IHandler Handler) | |
Remove a handler. | |
![]() | |
TdjAbstractHandler () | |
Constructor. | |
DoStart () | |
Start the handler. | |
DoStop () | |
Start the handler. | |
Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
Handle a HTTP request. | |
![]() | |
Start () | |
Start the handler. | |
Stop () | |
Stop the handler. | |
Boolean | IsStarted () |
Boolean | IsStopped () |
Protected Attributes | |
TdjHandlers | FHandlers |
The handler collection. | |
Additional Inherited Members | |
![]() | |
Boolean | Started |
True if the state is "started". | |
Boolean | Stopped |
True if the state is "stopped". | |
![]() | |
AddHandler (const IHandler Handler) | |
Add a handler. | |
RemoveHandler (const IHandler Handler) | |
Remove a handler. | |
![]() | |
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. | |
A collection of handlers.
For each request, all handler are called, regardless of the response status or exceptions.
TdjHandlerCollection::AddHandler | ( | const IHandler | Handler | ) |
Add a handler.
Handler | the handler to be added. |
References FHandlers, and TdjLifeCycle::Started.
TdjHandlerCollection::Handle | ( | const string | Target, |
TdjServerContext | Context, | ||
TdjRequest | Request, | ||
TdjResponse | Response ) |
Handle a HTTP request.
Target | Request target |
Context | HTTP server context |
Request | HTTP request |
Response | HTTP response |
References FHandlers, and TdjLifeCycle::IsStarted().