TRORemoteService

Overview

The Remote Service component is used to represent the connection to a remote service - both the channel and message component as well as the name of the service.

Location


 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CacheRODL

Determines whether the RODL Library available through the GetRODLLibrary method will be cached between calls. If set to false (default), the RODL file will be retrieved from the server every time GetRODLLibrary is called. If set to true, the RODL will only be downloaded once, the first time it is needed.

property CacheRODL: Boolean read write

Channel

This is the channel component that will be used to communicate with the Service.

property Channel: TROTransportChannel read write

CheckCanConnect

procedure CheckCanConnect(CheckServiceName: Boolean)

Parameters:

  • CheckServiceName:

CheckProperties

Validates the service properies.

procedure CheckProperties

CloneMessage

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

GetRODLLibrary  virtual

Obtains the RODL file from the server (if needed) and returns a TRODLLibrary instance representing the content of the library. The TRODLLibrary instance returned is owned by the Remote Service component. It and all its elements are freed whenever a new RODL is downloaded (if CacheRODL is false), or when the Service is freed.

function GetRODLLibrary: TRODLLibrary

GetServiceMethods  virtual

Returns a list of all methods defined in the Service.

function GetServiceMethods: IROStrings

GetServiceName  protected

function GetServiceName: string

GetServiceNames

Returns a list of all services defined in the server's RODL library.

function GetServiceNames(aIncludeAbstractServices: Boolean): IROStrings

Parameters:

  • aIncludeAbstractServices:

Message

The message format that will be used to communicate with the Service.

property Message: TROMessage read write

Notification  protected override    (declared in TROChannelAwareComponent)

Forwards notification messages to all owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation)

Parameters:

  • AComponent: component
  • Operation: operation

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

ServiceName

Sets the name of the Service.

property ServiceName: string read write

SetRODLLibrary

procedure SetRODLLibrary(aLibrary: TRODLLibrary)

Parameters:

  • aLibrary:

SetUpForTargetUri

procedure SetUpForTargetUri(const aUri: TROUri)

Parameters:

  • aUri: Server Uri

SetUpForTargetUrl

procedure SetUpForTargetUrl(const aUrl: string)

Parameters:

  • aUrl:

 

CacheRODL

Determines whether the RODL Library available through the GetRODLLibrary method will be cached between calls. If set to false (default), the RODL file will be retrieved from the server every time GetRODLLibrary is called. If set to true, the RODL will only be downloaded once, the first time it is needed.

property CacheRODL: Boolean read write

Channel

This is the channel component that will be used to communicate with the Service.

property Channel: TROTransportChannel read write

CloneMessage

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

Message

The message format that will be used to communicate with the Service.

property Message: TROMessage read write

ServiceName

Sets the name of the Service.

property ServiceName: string read write

 

constructor Create  override

Standard component constructor

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner

Assign  override

Copies the contents of another, similar object.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

CheckCanConnect

procedure CheckCanConnect(CheckServiceName: Boolean)

Parameters:

  • CheckServiceName:

CheckProperties

Validates the service properies.

procedure CheckProperties

GetRODLLibrary  virtual

Obtains the RODL file from the server (if needed) and returns a TRODLLibrary instance representing the content of the library. The TRODLLibrary instance returned is owned by the Remote Service component. It and all its elements are freed whenever a new RODL is downloaded (if CacheRODL is false), or when the Service is freed.

function GetRODLLibrary: TRODLLibrary

GetServiceMethods  virtual

Returns a list of all methods defined in the Service.

function GetServiceMethods: IROStrings

GetServiceName  protected

function GetServiceName: string

GetServiceNames

Returns a list of all services defined in the server's RODL library.

function GetServiceNames(aIncludeAbstractServices: Boolean): IROStrings

Parameters:

  • aIncludeAbstractServices:

Notification  protected override    (declared in TROChannelAwareComponent)

Forwards notification messages to all owned components.

procedure Notification(AComponent: TComponent; Operation: TOperation)

Parameters:

  • AComponent: component
  • Operation: operation

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

SetRODLLibrary

procedure SetRODLLibrary(aLibrary: TRODLLibrary)

Parameters:

  • aLibrary:

SetUpForTargetUri

procedure SetUpForTargetUri(const aUri: TROUri)

Parameters:

  • aUri: Server Uri

SetUpForTargetUrl

procedure SetUpForTargetUrl(const aUrl: string)

Parameters:

  • aUrl: