Daraja HTTP Framework 3.1.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 ()
 OnCommand (TIdContext AContext, TdjRequest ARequestInfo, TdjResponse AResponseInfo)
 SetStarted (const Boolean Value)
 SetStopped (const Boolean Value)
 Start ()
 Starts the component.
 Stop ()
 Stops the component.

Public Attributes

TCriticalSection CS
string FHost
TdjHTTPServer FHTTPServer
Integer FPort
Boolean FStopped
string Host
 The host address for the connector.
string HostAndPort
TdjHTTPServer HTTPServer
Integer Port
 The port number for the connector.
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.

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

◆ CheckStarted()

TdjLifeCycle::CheckStarted ( )
protectedinherited

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

◆ CheckStopped()

TdjLifeCycle::CheckStopped ( )
protectedinherited

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

References TdjLifeCycle().

◆ IsStarted()

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

Implements ILifeCycle.

References TdjLifeCycle().

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

◆ IsStopped()

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

Implements ILifeCycle.

References Create().

Referenced by DoStart().

◆ OnCommand()

TdjHTTPConnector::OnCommand ( TIdContext AContext,
TdjRequest ARequestInfo,
TdjResponse AResponseInfo )

◆ SetStarted()

TdjLifeCycle::SetStarted ( const Boolean Value)
inherited

Referenced by DoStop().

◆ SetStopped()

TdjLifeCycle::SetStopped ( const Boolean Value)
inherited

Referenced by DoStop().

◆ Start()

TdjLifeCycle::Start ( )
inherited

Starts the component.

Implements ILifeCycle.

References TdjLifeCycle().

Referenced by DoStart().

◆ Stop()

TdjLifeCycle::Stop ( )
inherited

Stops the component.

Implements ILifeCycle.

References Stopped.

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

Member Data Documentation

◆ CS

TCriticalSection TdjLifeCycle::CS
inherited

Referenced by ~TdjLifeCycle().

◆ FHost

string TdjAbstractConnector::FHost
inherited

◆ FHTTPServer

TdjHTTPServer TdjHTTPConnector::FHTTPServer

◆ FPort

Integer TdjAbstractConnector::FPort
inherited

◆ FStopped

Boolean TdjLifeCycle::FStopped
inherited

Referenced by ~TdjLifeCycle(), and DoStop().

◆ Handler

IHandler TdjAbstractConnector::Handler
protectedinherited

◆ Host

string TdjAbstractConnector::Host
inherited

The host address for the connector.

◆ HostAndPort

string TdjHTTPConnector::HostAndPort

◆ HTTPServer

TdjHTTPServer TdjHTTPConnector::HTTPServer

◆ Port

Integer TdjAbstractConnector::Port
inherited

The port number for the connector.

◆ Started

Boolean TdjLifeCycle::Started
inherited

◆ Stopped

Boolean TdjLifeCycle::Stopped
inherited

Referenced by DoStop(), and Stop().