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

Implements

 

constructor Create  override

Creates a new instance.

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:

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 TROProxy.__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:

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(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:

CloneMessage

Controls which message instance will be used for remote requests. The value of this property affects TROProxy.__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:

ServiceName

Sets the name of the Service.

property ServiceName: string read write

 

constructor Create  override

Creates a new instance.

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:

ROFreeNotification    (declared in TROComponent)

Forwards notification messages to all owned RO components.

procedure ROFreeNotification(AComponent: TComponent)

Parameters:

  • AComponent: component

RORemoveFreeNotification    (declared in TROComponent)

Disables destruction notification for specified RO component.

procedure RORemoveFreeNotification(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:

See Also