|
Daraja HTTP Framework 3.0.7-SNAPSHOT
HTTP server framework for Object Pascal
|
Basic server class for the Web Component framework. More...
Public Member Functions | |
| TdjServer () | |
| Create a TdjServer using the default host and port. | |
| TdjServer (const Integer APort) | |
| Create a TdjServer, using the specified port and the default host. | |
| TdjServer (const string AHost, const Integer APort=DEFAULT_BINDING_PORT) | |
| Create a TdjServer, using the specfied host and port. | |
| ~TdjServer () | |
| Destructor. | |
| Add (TdjWebComponentContextHandler Context) | |
| Add a new context. | |
| AddConnector (const IConnector Connector) | |
| Add a preconfigured connector. | |
| AddConnector (const string Host, Integer Port=DEFAULT_BINDING_PORT) | |
| Create and add a connector for a host and port. | |
| AddHandler (const IHandler Handler) | |
| Add a handler to the container. | |
| Integer | ConnectorCount () |
| The number of connectors. | |
| Boolean | IsStarted () |
| Boolean | IsStopped () |
| RemoveHandler (const IHandler Handler) | |
| Removes a handler from this container. | |
| Start () | |
| Starts the component. | |
| Stop () | |
| Stops the component. | |
Public Attributes | |
| IHandler | Handler |
| Boolean | Started |
| Boolean | Stopped |
Protected Member Functions | |
| CheckStarted () | |
| Raises an exception if the lifecycle is in "started" state. | |
| CheckStopped () | |
| Raises an exception if the lifecycle is in "stopped" state. | |
| TIdHTTPSession | GetSession (TdjServerContext Context, TdjRequest Request, TdjResponse Response, const Boolean Create) |
| Get a HTTP session. | |
| Handle (const string Target, TdjServerContext Context, TdjRequest Request, TdjResponse Response) | |
| Handles an HTTP request. | |
Basic server class for the Web Component framework.
| TdjServer::TdjServer | ( | ) |
Create a TdjServer using the default host and port.
References AddConnector(), and Create().
| TdjServer::TdjServer | ( | const Integer | APort | ) |
| TdjServer::TdjServer | ( | const string | AHost, |
| const Integer | APort = DEFAULT_BINDING_PORT ) |
Create a TdjServer, using the specfied host and port.
| AHost | the host to be used. |
| APort | the port to be used. |
| TdjServer::~TdjServer | ( | ) |
Destructor.
| TdjServer::Add | ( | TdjWebComponentContextHandler | Context | ) |
Add a new context.
| Context | the context handler. |
| EWebComponentException | if an error occurs that interferes with the component's normal operation. |
Referenced by TdjServer(), and ConnectorCount().
| TdjServer::AddConnector | ( | const IConnector | Connector | ) |
| TdjServer::AddConnector | ( | const string | Host, |
| Integer | Port = DEFAULT_BINDING_PORT ) |
Create and add a connector for a host and port.
| Host | the connector host name |
| Port | the connector port number |
|
inherited |
Add a handler to the container.
This implementation of AddHandler calls SetHandler with the passed handler. If this HandlerWrapper had a previous wrapped handler, then it is passed to a call to AddHandler on the passed handler.
| Handler | the handler to be added |
Implements IHandlerContainer.
|
protectedinherited |
Raises an exception if the lifecycle is in "started" state.
References TdjLifeCycle().
|
protectedinherited |
Raises an exception if the lifecycle is in "stopped" state.
References TdjLifeCycle(), and Started.
| Integer TdjServer::ConnectorCount | ( | ) |
|
protectedinherited |
Get a HTTP session.
References TdjHandlerWrapper(), Create(), and Handler.
Referenced by TdjWebComponentContextHandler::AddWebComponent().
|
protectedinherited |
Handles an HTTP request.
| Target | Target path or resource identifier |
| Context | Server context for this request |
| Request | HTTP request object |
| Response | HTTP response object to populate |
| EWebComponentException | if an exception occurs that interferes with the component's normal operation. |
Implements IHandler.
|
inherited |
Implements ILifeCycle.
References Create().
Referenced by DoStart(), and TdjWebComponentHandler::FindHolder().
|
inherited |
|
inherited |
Removes a handler from this container.
| Handler | Handler to remove |
Implements IHandlerContainer.
References Handler.
|
inherited |
|
inherited |
Stops the component.
Implements ILifeCycle.
References TdjLifeCycle().
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
|
inherited |
Referenced by GetSession(), and RemoveHandler().
|
inherited |