TROMessageDispatcher
Overview
This class is used by the TROServer component to configure the list of dispatchers provided by the server.
You will usually not create instances of this class yourself, but work with them using the TROServer.Dispatchers collection property.
Location
- Unit: uROServer.pas
- Ancestry: TCollectionItem | TROMessageDispatcher
constructor Create override
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 virtual
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
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
Returns the name of the message dispatcher as it appears in the collection editor.
function GetDisplayName: string
Message
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
property MessageIntf: IROMessage read
ModuleIntf
property ModuleIntf: IROModuleInfo read
Name
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
ProcessMessage
function ProcessMessage(const aTransport: IROTransport; aRequestStream: TStream; aResponseStream: TStream; out oResponseOptions: TROResponseOptions; const aServeRodl: Boolean): Boolean
Parameters:
- aTransport:
- aRequestStream:
- aResponseStream:
- oResponseOptions:
- aServeRodl:
Server protected
Returns the server component the dispatcher is needed for.
property Server: TROServer read
Enabled
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
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
property MessageIntf: IROMessage read
ModuleIntf
property ModuleIntf: IROModuleInfo read
Name
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
Server protected
Returns the server component the dispatcher is needed for.
property Server: TROServer read
constructor Create override
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 virtual
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
Returns the name of the message dispatcher as it appears in the collection editor.
function GetDisplayName: string
ProcessMessage
function ProcessMessage(const aTransport: IROTransport; aRequestStream: TStream; aResponseStream: TStream; out oResponseOptions: TROResponseOptions; const aServeRodl: Boolean): Boolean
Parameters:
- aTransport:
- aRequestStream:
- aResponseStream:
- oResponseOptions:
- aServeRodl: