TROAsyncProxy

Overview

This class forms the base for proxy classes in the _Async units generated from your RODL.

Use Case

You will usually not deal directly with classes of this type, but cast client-side service interfaces to IROAsyncInterface to access some of the properties it provides.

Location


 

constructor Create (IROMessage, IROTransportChannel)  override

Creates a new instance with given parameters.

constructor Create(const aMessage: IROMessage; const aTransportChannel: IROTransportChannel)

Parameters:

  • aMessage: Message
  • aTransportChannel: Channel

constructor Create (string, IROMessage, IROTransportChannel)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aMessage: IROMessage; const aTransportChannel: IROTransportChannel)

Parameters:

  • anInterfaceName: Interface name
  • aMessage: Message
  • aTransportChannel: Channel

constructor Create (string, TROUri, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aUri: TROUri; aDefaultNameSpaces: string)

Parameters:

  • anInterfaceName: Interface name
  • aUri: Target URI
  • aDefaultNameSpaces: Default namespace

constructor Create (string, string, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aUrl: string; aDefaultNameSpaces: string)

Parameters:

  • anInterfaceName: Interface name
  • aUrl: Target URL
  • aDefaultNameSpaces: Default namespace

constructor Create (TROUri, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const aUri: TROUri; aDefaultNameSpaces: string)

Parameters:

  • aUri: Target URI
  • aDefaultNameSpaces: Default namespace

constructor Create (string, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const aUrl: string; aDefaultNameSpaces: string)

Parameters:

  • aUrl: Target URL
  • aDefaultNameSpaces: Default namespace

AnswerReceived

Specifies whether an answer has been received for the previous asynchronous request (true) or not (false). You can use this property to poll the current status of the request. For example to enable a user interface option to retrieve the result.

property AnswerReceived: Boolean read

Busy

Specifies whether the proxy is currently busy processing an asynchronous call (true) or not (false). Asynchronous proxies are only capable of dispatching one asynchronous call at a time, and attempts to make a second call while the proxy is busy will result in an EROChannelBusy exception.

property Busy: Boolean read

CloneMessage    (declared in TROBaseProxy)

Controls which message instance will be used for remote requests. The value of this property affects TROBaseProxy.__GetMessage behavior, when set to true it will clone the message instance every time before making a remote request. Cloning the message helps to avoid conflicts in multithreaded environment (e.g. when TROEventReceiver is used).

property CloneMessage: Boolean read write

MessageID

Contains the MessageID of the request currently being executed. Since true asynchronous channels (such as the Super TCP Channel) can execute multiple requests at the same time, they assign an internal message to each request sent, to later match up the received response with the right request.

property MessageID: string read write

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

 

AnswerReceived

Specifies whether an answer has been received for the previous asynchronous request (true) or not (false). You can use this property to poll the current status of the request. For example to enable a user interface option to retrieve the result.

property AnswerReceived: Boolean read

Busy

Specifies whether the proxy is currently busy processing an asynchronous call (true) or not (false). Asynchronous proxies are only capable of dispatching one asynchronous call at a time, and attempts to make a second call while the proxy is busy will result in an EROChannelBusy exception.

property Busy: Boolean read

CloneMessage    (declared in TROBaseProxy)

Controls which message instance will be used for remote requests. The value of this property affects TROBaseProxy.__GetMessage behavior, when set to true it will clone the message instance every time before making a remote request. Cloning the message helps to avoid conflicts in multithreaded environment (e.g. when TROEventReceiver is used).

property CloneMessage: Boolean read write

MessageID

Contains the MessageID of the request currently being executed. Since true asynchronous channels (such as the Super TCP Channel) can execute multiple requests at the same time, they assign an internal message to each request sent, to later match up the received response with the right request.

property MessageID: string read write

RefCount    (declared in TROInterfacedObject)

Provides read-only access to the reference counter. When this value reaches zero, the object is freed.

property RefCount: Integer read

 

NewInstance  override    (declared in TROInterfacedObject)

Creates and returns a new instance of the interfaced object, initializing its reference counter with 1.

class function NewInstance: TObject

 

constructor Create (IROMessage, IROTransportChannel)  override

Creates a new instance with given parameters.

constructor Create(const aMessage: IROMessage; const aTransportChannel: IROTransportChannel)

Parameters:

  • aMessage: Message
  • aTransportChannel: Channel

constructor Create (string, IROMessage, IROTransportChannel)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aMessage: IROMessage; const aTransportChannel: IROTransportChannel)

Parameters:

  • anInterfaceName: Interface name
  • aMessage: Message
  • aTransportChannel: Channel

constructor Create (string, TROUri, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aUri: TROUri; aDefaultNameSpaces: string)

Parameters:

  • anInterfaceName: Interface name
  • aUri: Target URI
  • aDefaultNameSpaces: Default namespace

constructor Create (string, string, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const anInterfaceName: string; const aUrl: string; aDefaultNameSpaces: string)

Parameters:

  • anInterfaceName: Interface name
  • aUrl: Target URL
  • aDefaultNameSpaces: Default namespace

constructor Create (TROUri, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const aUri: TROUri; aDefaultNameSpaces: string)

Parameters:

  • aUri: Target URI
  • aDefaultNameSpaces: Default namespace

constructor Create (string, string)  overload virtual    (declared in TROBaseProxy)

Creates a new instance with given parameters.

constructor Create(const aUrl: string; aDefaultNameSpaces: string)

Parameters:

  • aUrl: Target URL
  • aDefaultNameSpaces: Default namespace