|
Daraja HTTP Framework 3.4.0-SNAPSHOT
HTTP server framework for Object Pascal
|
Holds a WebComponent and configuration data. More...
Public Member Functions | |
| TdjWebComponentHolder (TdjWebComponentClass WebComponentClass) | |
| Constructor. | |
| ~TdjWebComponentHolder () | |
| Destructor. | |
| IContext | GetContext () |
| Get the context. | |
| Boolean | IsStarted () |
| Boolean | IsStopped () |
| SetContext (const IContext Context) | |
| Set the context. | |
| SetInitParameter (const string Key, const string Value) | |
| Set initialization parameter. | |
| Start () | |
| Starts the component. | |
| Stop () | |
| Stops the component. | |
Public Attributes | |
| Integer | LoadOnStartup |
| Controls the order in which Web Components are initialized when their context starts, mirroring the Servlet spec's load-on-startup element: components with a lower value are started first. | |
| string | Name |
| Boolean | Started |
| Boolean | Stopped |
| TdjWebComponent | WebComponent |
| The instance of the Web Component. | |
| TdjWebComponentClass | WebComponentClass |
| The Web Component Class. | |
Protected Member Functions | |
| CheckNotStarted () | |
| Raises an exception if the lifecycle is already in "started" state. | |
| CheckNotStopped () | |
| Raises an exception if the lifecycle is already in "stopped" state. | |
Holds a WebComponent and configuration data.
| TdjWebComponentHolder::TdjWebComponentHolder | ( | TdjWebComponentClass | WebComponentClass | ) |
Constructor.
| WebComponentClass | the Web Component class |
| TdjWebComponentHolder::~TdjWebComponentHolder | ( | ) |
Destructor.
References WebComponentClass.
|
protectedinherited |
Raises an exception if the lifecycle is already in "started" state.
References Started, and Stopped.
Referenced by TdjWebFilterHolders::TdjWebFilterHolders(), and TdjWebComponentHandler::InvokeService().
|
protectedinherited |
Raises an exception if the lifecycle is already in "stopped" state.
References TdjLifeCycle().
| IContext TdjWebComponentHolder::GetContext | ( | ) |
Get the context.
|
inherited |
Implements ILifeCycle.
References TdjLifeCycle().
Referenced by DoStop(), and TdjWebComponentHandler::FindHolder().
|
inherited |
Implements ILifeCycle.
References Stopped.
Referenced by DoStop().
| TdjWebComponentHolder::SetContext | ( | const IContext | Context | ) |
Set the context.
| Context | the context |
| TdjWebComponentHolder::SetInitParameter | ( | const string | Key, |
| const string | Value ) |
Set initialization parameter.
| Key | init parameter name (case-sensitive) |
| Value | init parameter value |
| EDarajaConfigException | if the key is already set |
|
inherited |
Starts the component.
Implements ILifeCycle.
References TdjLifeCycle().
Referenced by DoStop(), and TdjWebComponentHandler::SetStrictStart().
|
inherited |
Stops the component.
Implements ILifeCycle.
References Started.
Referenced by DoStop(), and TdjWebComponentHandler::InvokeService().
| Integer TdjWebComponentHolder::LoadOnStartup |
Controls the order in which Web Components are initialized when their context starts, mirroring the Servlet spec's load-on-startup element: components with a lower value are started first.
Components with the same value (the default, 0) are started in registration order. Has no effect once the holder has already started.
A negative value means the component is not started at context start; instead it is initialized lazily, on the first request that maps to it. Concurrent first requests are safe: only one of them performs the initialization, the others wait for it to finish. If that initialization raises, the request that triggered it receives a 500 response and the holder remains not started, so the next request retries initialization instead of being permanently unavailable.
|
inherited |
|
inherited |
Referenced by CheckNotStarted(), and Stop().
|
inherited |
Referenced by CheckNotStarted(), and IsStopped().
| TdjWebComponent TdjWebComponentHolder::WebComponent |
The instance of the Web Component.
| TdjWebComponentClass TdjWebComponentHolder::WebComponentClass |
The Web Component Class.
Referenced by ~TdjWebComponentHolder().