TROHTTPDispatcher
Overview
The extension for the message dispatcher class supporting HTTP protocol specific features.
Instances of this class are created by the designer when message dispatcher(s) are configured for any HTTP channel. They can be created programmatically from the user code for the same purpose, to configure the HTTP channel.
Location
- Unit: uROHTTPDispatch.pas
- Ancestry: TCollectionItem | TROMessageDispatcher | TROHTTPDispatcher
constructor Create override (declared in TROMessageDispatcher)
Creates a new instance.
constructor Create(aCollection: TCollection)
Parameters:
- aCollection: collection
Assign override
Copies data from a given source.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CanHandleMessage override
Determines if the request stream can be handled by the dispatcher. The method returns true if the request can be handled. Requests paths are compared with the PathInfo property value.
function CanHandleMessage(const aTransport: IROTransport; aRequeststream: TStream): Boolean
Parameters:
- aTransport: Transport
- aRequeststream: Request stream
Enabled (declared in TROMessageDispatcher)
Enable (true) or disable (false) the dispatcher. Only enabled dispatchers will be considered when processing requests from a client; a disabled dispatcher will behave as if it weren't defined at all.
property Enabled: Boolean read write
GetDisplayName protected override (declared in TROMessageDispatcher)
Returns the name of the message dispatcher as it appears in the collection editor.
function GetDisplayName: string
Message (declared in TROMessageDispatcher)
Defines the message format to be used for this dispatcher to decode and encode messages that are received from and sent to clients.
property Message: TROMessage read write
MessageIntf (declared in TROMessageDispatcher)
property MessageIntf: IROMessage read
ModuleIntf (declared in TROMessageDispatcher)
property ModuleIntf: IROModuleInfo read
Name (declared in TROMessageDispatcher)
Specifies the name for the dispatcher. In HTTP based servers, the Name will be appended as a folder to the server URL, allowing the server to make multiple dispatchers available at different URLs.
property Name: string read write
PathInfo
The request path the dispatcher needs to serve for. It is the part of the service target URL; for example, if the target URL needs to be http://example.org:8089/bin, the PathInfo property should be assigned a /bin/ value.
property PathInfo: string read write
ProcessMessage (declared in TROMessageDispatcher)
function ProcessMessage(const aTransport: IROTransport; aRequestStream: TStream; aResponseStream: TStream; out oResponseOptions: TROResponseOptions; const aServeRodl: Boolean): Boolean
Parameters:
- aTransport:
- aRequestStream:
- aResponseStream:
- oResponseOptions:
- aServeRodl:
Server protected (declared in TROMessageDispatcher)
Returns the server component the dispatcher is needed for.
property Server: TROServer read
Enabled (declared in TROMessageDispatcher)
Enable (true) or disable (false) the dispatcher. Only enabled dispatchers will be considered when processing requests from a client; a disabled dispatcher will behave as if it weren't defined at all.
property Enabled: Boolean read write
Message (declared in TROMessageDispatcher)
Defines the message format to be used for this dispatcher to decode and encode messages that are received from and sent to clients.
property Message: TROMessage read write
MessageIntf (declared in TROMessageDispatcher)
property MessageIntf: IROMessage read
ModuleIntf (declared in TROMessageDispatcher)
property ModuleIntf: IROModuleInfo read
Name (declared in TROMessageDispatcher)
Specifies the name for the dispatcher. In HTTP based servers, the Name will be appended as a folder to the server URL, allowing the server to make multiple dispatchers available at different URLs.
property Name: string read write
PathInfo
The request path the dispatcher needs to serve for. It is the part of the service target URL; for example, if the target URL needs to be http://example.org:8089/bin, the PathInfo property should be assigned a /bin/ value.
property PathInfo: string read write
Server protected (declared in TROMessageDispatcher)
Returns the server component the dispatcher is needed for.
property Server: TROServer read
constructor Create override (declared in TROMessageDispatcher)
Creates a new instance.
constructor Create(aCollection: TCollection)
Parameters:
- aCollection: collection
Assign override
Copies data from a given source.
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
CanHandleMessage override
Determines if the request stream can be handled by the dispatcher. The method returns true if the request can be handled. Requests paths are compared with the PathInfo property value.
function CanHandleMessage(const aTransport: IROTransport; aRequeststream: TStream): Boolean
Parameters:
- aTransport: Transport
- aRequeststream: Request stream
GetDisplayName protected override (declared in TROMessageDispatcher)
Returns the name of the message dispatcher as it appears in the collection editor.
function GetDisplayName: string
ProcessMessage (declared in TROMessageDispatcher)
function ProcessMessage(const aTransport: IROTransport; aRequestStream: TStream; aResponseStream: TStream; out oResponseOptions: TROResponseOptions; const aServeRodl: Boolean): Boolean
Parameters:
- aTransport:
- aRequestStream:
- aResponseStream:
- oResponseOptions:
- aServeRodl: