Daraja HTTP Framework 3.2.1-SNAPSHOT
HTTP server framework for Object Pascal
Loading...
Searching...
No Matches
TdjHTTPConnector Class Reference

HTTP connector. More...

Inheritance diagram for TdjHTTPConnector:
TdjAbstractConnector TdjLifeCycle IConnector ILifeCycle

Public Member Functions

 TdjHTTPConnector (const IHandler Handler)
 Create a HTTP connector.
 ~TdjHTTPConnector ()
 Destructor.
Boolean IsStarted ()
Boolean IsStopped ()
 Start ()
 Starts the component.
 Stop ()
 Stops the component.

Public Attributes

string Host
 The host address for the connector.
TdjHTTPServer HTTPServer
Integer Port
 The port number for the connector.
Boolean Started
Boolean Stopped

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.

Protected Attributes

IHandler Handler
 Handler for incoming requests.

Detailed Description

HTTP connector.

Instances of this class wrap a TdjHTTPServer component.

Constructor & Destructor Documentation

◆ TdjHTTPConnector()

TdjHTTPConnector::TdjHTTPConnector ( const IHandler Handler)

Create a HTTP connector.

The handler is a required argument. The connector will call the "Handle" method for incoming requests.

Parameters
Handlerthe request handler

References TdjHTTPConnector(), and TdjAbstractConnector::Handler.

Referenced by TdjHTTPConnector().

◆ ~TdjHTTPConnector()

TdjHTTPConnector::~TdjHTTPConnector ( )

Destructor.

References TdjAbstractConnector::Handler.

Member Function Documentation

◆ CheckNotStarted()

TdjLifeCycle::CheckNotStarted ( )
protectedinherited

Raises an exception if the lifecycle is already in "started" state.

References Started, and Stopped.

Referenced by TdjWebFilterHolders::TdjWebFilterHolders().

◆ CheckNotStopped()

TdjLifeCycle::CheckNotStopped ( )
protectedinherited

Raises an exception if the lifecycle is already in "stopped" state.

References TdjLifeCycle().

◆ IsStarted()

Boolean TdjLifeCycle::IsStarted ( )
inherited
Returns
True if component is started

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStop(), and TdjWebComponentHandler::InvokeService().

◆ IsStopped()

Boolean TdjLifeCycle::IsStopped ( )
inherited
Returns
True if component is stopped

Implements ILifeCycle.

References Stopped.

Referenced by DoStop().

◆ Start()

TdjLifeCycle::Start ( )
inherited

Starts the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStop().

◆ Stop()

TdjLifeCycle::Stop ( )
inherited

Stops the component.

Note
Unlike Start, a failure in the custom stop code is logged and swallowed rather than re-raised; the component is still marked stopped.

Implements ILifeCycle.

References Started.

Referenced by DoStop(), and TdjWebComponentHandler::InvokeService().

Member Data Documentation

◆ Handler

IHandler TdjAbstractConnector::Handler
protectedinherited

Handler for incoming requests.

Referenced by TdjHTTPConnector::TdjHTTPConnector(), and TdjHTTPConnector::~TdjHTTPConnector().

◆ Host

string TdjAbstractConnector::Host
inherited

The host address for the connector.

◆ HTTPServer

TdjHTTPServer TdjHTTPConnector::HTTPServer

◆ Port

Integer TdjAbstractConnector::Port
inherited

The port number for the connector.

◆ Started

Boolean TdjLifeCycle::Started
inherited

Referenced by CheckNotStarted(), and Stop().

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by CheckNotStarted(), and IsStopped().