TROHttpApiDispatcher

Overview

Location

 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Activate  override

procedure Activate

ApiHost

property ApiHost: string read write

ApiName

property ApiName: string read write

ApiVersion

property ApiVersion: string read write

Assign  override    (declared in TROComponent)

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AuthenticationManager

property AuthenticationManager: TROHttpApiBaseAuthenticationManager read write

CanHandlePath    (declared in TROExtendedHttpDispatcher)

Return true if the given path can be handled by the dispatcher. The function compares the Path property content with the given path and chacks if the given path starts with the Path subpath.

function CanHandlePath(aPath: string): Boolean

Parameters:

  • aPath: The request path to check.

Deactivate  virtual    (declared in TROExtendedHttpDispatcher)

procedure Deactivate

Notification  protected override    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure Notification(aComponent: TComponent; Operation: TOperation)

Parameters:

  • aComponent: component
  • Operation: operation

NotifyDispose    (declared in TROExtendedHttpDispatcher)

This procedure is called when the server HTTP channel is about to be freed.

procedure NotifyDispose

OnSchemaComplete

property OnSchemaComplete: TROHttpApiSchemaCompleteEvent read write
delegate: procedure OnSchemaComplete(const aRoot: TROJSONObject)

Path    (declared in TROExtendedHttpDispatcher)

The request path the dispatcher will be activated for. For example, if this property contains /js then the dispatcher will be activated by the server channel to process such requests as http://example.org:8099/js/* (the asterisk means zero or more characters to continue the request path).

property Path: string read write

Process  override

The main method to perform the request processing ant to form the response. Called every time to process incoming requests if the dispatcher is suitable to process it (determined by CanHandlePath result).

procedure Process(aTransport: IROHTTPTransport; aRequest: IROHTTPRequest; aResponse: IROHTTPResponse; aRequestData: TStream; aResponseData: TStream)

Parameters:

  • aTransport: Http transport.
  • aRequest: Contains object implementing IROHTTPRequest interface that describes the request.
  • aResponse: Contains initialized object implementing IROHTTPResponse interface that should describe the response.
  • aRequestData: The data stream (TStream) that contains the raw HTTP request data except the header part.
  • aResponseData: Contais initialized and empty data stream (TStream) that shpuld be filled with the raw reponse data except the header part.

ResetCache

procedure ResetCache

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

Server    (declared in TROExtendedHttpDispatcher)

Points to the HTTP server channel which the dispatcher works with.

property Server: IROHTTPServer read write

 

ApiHost

property ApiHost: string read write

ApiName

property ApiName: string read write

ApiVersion

property ApiVersion: string read write

AuthenticationManager

property AuthenticationManager: TROHttpApiBaseAuthenticationManager read write

Path    (declared in TROExtendedHttpDispatcher)

The request path the dispatcher will be activated for. For example, if this property contains /js then the dispatcher will be activated by the server channel to process such requests as http://example.org:8099/js/* (the asterisk means zero or more characters to continue the request path).

property Path: string read write

Server    (declared in TROExtendedHttpDispatcher)

Points to the HTTP server channel which the dispatcher works with.

property Server: IROHTTPServer read write

 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Activate  override

procedure Activate

Assign  override    (declared in TROComponent)

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CanHandlePath    (declared in TROExtendedHttpDispatcher)

Return true if the given path can be handled by the dispatcher. The function compares the Path property content with the given path and chacks if the given path starts with the Path subpath.

function CanHandlePath(aPath: string): Boolean

Parameters:

  • aPath: The request path to check.

Deactivate  virtual    (declared in TROExtendedHttpDispatcher)

procedure Deactivate

Notification  protected override    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure Notification(aComponent: TComponent; Operation: TOperation)

Parameters:

  • aComponent: component
  • Operation: operation

NotifyDispose    (declared in TROExtendedHttpDispatcher)

This procedure is called when the server HTTP channel is about to be freed.

procedure NotifyDispose

Process  override

The main method to perform the request processing ant to form the response. Called every time to process incoming requests if the dispatcher is suitable to process it (determined by CanHandlePath result).

procedure Process(aTransport: IROHTTPTransport; aRequest: IROHTTPRequest; aResponse: IROHTTPResponse; aRequestData: TStream; aResponseData: TStream)

Parameters:

  • aTransport: Http transport.
  • aRequest: Contains object implementing IROHTTPRequest interface that describes the request.
  • aResponse: Contains initialized object implementing IROHTTPResponse interface that should describe the response.
  • aRequestData: The data stream (TStream) that contains the raw HTTP request data except the header part.
  • aResponseData: Contais initialized and empty data stream (TStream) that shpuld be filled with the raw reponse data except the header part.

ResetCache

procedure ResetCache

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure ROFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure RORemoveFreeNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

SendRemoveNotification  protected    (declared in TROComponent)

Forwards notification messages to all owned components.

procedure SendRemoveNotification(aComponent: TComponent)

Parameters:

  • aComponent: component

 

OnSchemaComplete

property OnSchemaComplete: TROHttpApiSchemaCompleteEvent read write
delegate: procedure OnSchemaComplete(const aRoot: TROJSONObject)