TROHTTPMessageDispatchers

Overview

The TROHTTPMessageDispatchers class is a specialized collection class to store message dispatchers for HTTP channels.
Users will normally not need to instantiate objects of this class but can interact with one when working with the HTTP channel's dispatchers collection, for example for configuring the dispatchers programmatically.

Location

 

constructor Create  virtual    (declared in TROMessageDispatchers)

Creates a new instance.

constructor Create(aServer: TROServer)

Parameters:

  • aServer: Server component the dispatchers are needed for

CleanReferences    (declared in TROMessageDispatchers)

Clears all references to the given aMessage of all dispatchers.

procedure CleanReferences(aMessage: TROMessage)

Parameters:

  • aMessage:

DispatcherByName    (declared in TROMessageDispatchers)

Returns the dispatcher with the given name or NIL. The search is not case-sensitive.

function DispatcherByName(const aName: string): TROMessageDispatcher

Parameters:

  • aName: Dispathcher name to look up

Dispatchers    (declared in TROMessageDispatchers)

Indexed property, provides access to dispatchers stored in the collection by index.

property Dispatchers[Index: Integer]: TROMessageDispatcher read

FindDispatcher    (declared in TROMessageDispatchers)

Returns the dispatcher which CanHandleMessage for the given transport and stream.

function FindDispatcher(const aTransport: IROTransport; aRequestStream: TStream): TROMessageDispatcher

Parameters:

  • aTransport:
  • aRequestStream:

FindDuplicate    (declared in TROMessageDispatchers)

Finds the dispatcher with the given message.

function FindDuplicate(aMessage: TROMessage): TROMessageDispatcher

Parameters:

  • aMessage:

GetDispatcherByPath

This method allows to select a proper dispatcher from the collection to handle the given HTTP request path. Calling this method is part of the message handling process performed by the server internally.

function GetDispatcherByPath(Path: string): TROHTTPDispatcher

Parameters:

  • Path: HTTP request path to check

GetDispatcherClass  protected override

Returns the TROHTTPDispatcher metaclass object.

function GetDispatcherClass: TROMessageDispatcherClass

GetSupportsMultipleDispatchers  protected override

Always returns true, because multiple dispatchers capability is supported by the HTTP protocol.

function GetSupportsMultipleDispatchers: Boolean

Server  protected    (declared in TROMessageDispatchers)

Returns the server component the dispatchers are needed for.

property Server: TROServer read

SupportsMultipleDispatchers    (declared in TROMessageDispatchers)

False by default. The TROHTTPMessageDispatchers overrides it to True.

property SupportsMultipleDispatchers: Boolean read

 

Dispatchers    (declared in TROMessageDispatchers)

Indexed property, provides access to dispatchers stored in the collection by index.

property Dispatchers[Index: Integer]: TROMessageDispatcher read

Server  protected    (declared in TROMessageDispatchers)

Returns the server component the dispatchers are needed for.

property Server: TROServer read

SupportsMultipleDispatchers    (declared in TROMessageDispatchers)

False by default. The TROHTTPMessageDispatchers overrides it to True.

property SupportsMultipleDispatchers: Boolean read

 

constructor Create  virtual    (declared in TROMessageDispatchers)

Creates a new instance.

constructor Create(aServer: TROServer)

Parameters:

  • aServer: Server component the dispatchers are needed for

CleanReferences    (declared in TROMessageDispatchers)

Clears all references to the given aMessage of all dispatchers.

procedure CleanReferences(aMessage: TROMessage)

Parameters:

  • aMessage:

DispatcherByName    (declared in TROMessageDispatchers)

Returns the dispatcher with the given name or NIL. The search is not case-sensitive.

function DispatcherByName(const aName: string): TROMessageDispatcher

Parameters:

  • aName: Dispathcher name to look up

FindDispatcher    (declared in TROMessageDispatchers)

Returns the dispatcher which CanHandleMessage for the given transport and stream.

function FindDispatcher(const aTransport: IROTransport; aRequestStream: TStream): TROMessageDispatcher

Parameters:

  • aTransport:
  • aRequestStream:

FindDuplicate    (declared in TROMessageDispatchers)

Finds the dispatcher with the given message.

function FindDuplicate(aMessage: TROMessage): TROMessageDispatcher

Parameters:

  • aMessage:

GetDispatcherByPath

This method allows to select a proper dispatcher from the collection to handle the given HTTP request path. Calling this method is part of the message handling process performed by the server internally.

function GetDispatcherByPath(Path: string): TROHTTPDispatcher

Parameters:

  • Path: HTTP request path to check

GetDispatcherClass  protected override

Returns the TROHTTPDispatcher metaclass object.

function GetDispatcherClass: TROMessageDispatcherClass

GetSupportsMultipleDispatchers  protected override

Always returns true, because multiple dispatchers capability is supported by the HTTP protocol.

function GetSupportsMultipleDispatchers: Boolean