|
Daraja HTTP Framework 3.1.1-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. | |
| IHandler | GetHandler () |
| Boolean | IsStarted () |
| Boolean | IsStopped () |
| RemoveHandler (const IHandler Handler) | |
| Removes a handler from this container. | |
| SetHandler (const IHandler Value) | |
| SetStarted (const Boolean Value) | |
| SetStopped (const Boolean Value) | |
| Start () | |
| Starts the component. | |
| StartConnectors () | |
| Stop () | |
| Stops the component. | |
| StopConnectors () | |
| StopContextHandlers () | |
Public Attributes | |
| < > TdjStrings | ConnectorList |
| IHandlerContainer | ContextHandlers |
| TStrings | ContextNames |
| TCriticalSection | CS |
| string | FDefaultHost |
| Integer | FDefaultPort |
| IHandler | FHandler |
| Boolean | FStopped |
| 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 Add().
Referenced by StartConnectors(), and StopContextHandlers().
| TdjServer::TdjServer | ( | const Integer | APort | ) |
Create a TdjServer, using the specified port and the default host.
| APort | the port to be used. |
| 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 | ) |
Add a preconfigured connector.
| Connector | the 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.
|
protectedinherited |
Raises an exception if the lifecycle is in "stopped" state.
References TdjLifeCycle().
| Integer TdjServer::ConnectorCount | ( | ) |
|
inherited |
References Handler, and SetHandler().
|
protectedinherited |
Get a HTTP session.
References TdjHandlerWrapper(), FHandler, Handler, and SetHandler().
Referenced by TdjWebComponentContextHandler::Add().
|
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 TdjLifeCycle().
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
|
inherited |
Implements ILifeCycle.
References Create().
Referenced by DoStart().
|
inherited |
Removes a handler from this container.
| Handler | Handler to remove |
Implements IHandlerContainer.
|
inherited |
References TdjHandlerWrapper(), Create(), and Handler.
Referenced by GetHandler(), and GetSession().
|
inherited |
Referenced by DoStop().
|
inherited |
Referenced by DoStop().
|
inherited |
| TdjServer::StartConnectors | ( | ) |
References TdjServer(), and Create().
|
inherited |
Stops the component.
Implements ILifeCycle.
References Stopped.
Referenced by DoStart(), and TdjWebComponentHandler::InvokeService().
| TdjServer::StopConnectors | ( | ) |
| TdjServer::StopContextHandlers | ( | ) |
References TdjServer(), and Create().
| < > TdjStrings TdjServer::ConnectorList |
| IHandlerContainer TdjServer::ContextHandlers |
| TStrings TdjServer::ContextNames |
|
inherited |
Referenced by ~TdjLifeCycle().
| string TdjServer::FDefaultHost |
| Integer TdjServer::FDefaultPort |
|
inherited |
Referenced by GetSession().
|
inherited |
Referenced by ~TdjLifeCycle(), and DoStop().
|
inherited |
Referenced by GetHandler(), GetSession(), and SetHandler().
|
inherited |
Referenced by TdjHandlerCollection::~TdjHandlerCollection(), and DoStop().