TROBroadcastChannel

Overview

TROBroadcastChannel implements a UDP based channel that uses the socket implementation provided by the open source Indy components that ship with Delphi.

Building upon the TROIndyUDPChannel, the broadcast channel will not send its requests to one specific server, but will broadcast them to all servers listening on the local subnet.

The OnBroadcastResponseReceived event will be fired for each response that is received.

Location

 

constructor Create  override

Creates a new instance.

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner.

AddRequestToStorage  protected    (declared in TROIndyUDPChannel)

procedure AddRequestToStorage(aRequest: TStream; aRequestID: string)

Parameters:

  • aRequest:
  • aRequestID:

Assign  override    (declared in TROTransportChannel)

Copies the contents of another, similar object.

procedure Assign(aSource: TPersistent)

Parameters:

  • aSource: Instance whose properties will be copied

AssignEvents  protected override

Copies the events of another, similar object.

procedure AssignEvents(aSource: TROTransportChannel)

Parameters:

  • aSource:

AssignSpecificProperties  protected override    (declared in TROIndyUDPChannel)

Copies the specific properties of another, similar object.

procedure AssignSpecificProperties(aSource: TROTransportChannel)

Parameters:

  • aSource:

AsyncException  protected virtual    (declared in TROTransportChannel)

Notifies about an exception in an asynchronous mode.

procedure AsyncException(aAsyncInterface: IROAsyncInterface; AsyncException: Exception)

Parameters:

  • aAsyncInterface: Exception source
  • AsyncException: Exception data

AsyncSynchronizeResponse    (declared in TROIndyUDPChannel)

property AsyncSynchronizeResponse: Boolean read write

AsyncTimeOut    (declared in TROIndyUDPChannel)

During this period of tome in milliseconds, an asynchronous response from the server will be waiting. The default value is 1000 (1 second). If no response is received from the server after the given timeout, the OnAsyncResponseTimeout event will fire. Due to the nature of asynchronous calls, no exception will be raised.

property AsyncTimeOut: Integer read write

BeforeDispatch  protected virtual    (declared in TROTransportChannel)

Allows an implimentation to do necessary preparatory actions (checking the readiness of the channel, restore session data, etc.).

procedure BeforeDispatch(aMessage: IROMessage)

Parameters:


Busy    (declared in TROTransportChannel)

Informs whether the channel is currently busy executing a remote request (true) or not (false). Most channels (except most notably the TROSuperTCPChannel) are only capable of performing one request at a time; if a second request is attempted while the channel is Busy, an EROChannelBusy exception will be raised.

property Busy: boolean read write

ChangeServerLocator  protected virtual    (declared in TROTransportChannel)

procedure ChangeServerLocator(var faultstartlocatoridx: integer; var aRetry: Boolean; const aException: Exception)

Parameters:

  • faultstartlocatoridx:
  • aRetry:
  • aException:

ChannelMatchingTargetUri    (declared in TROTransportChannel)

Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.

class function ChannelMatchingTargetUri(const aUri: TROUri): TROTransportChannel

Parameters:

  • aUri: Server Uri

ChannelMatchingTargetUrl    (declared in TROTransportChannel)

class function ChannelMatchingTargetUrl(const aUrl: string): TROTransportChannel

Parameters:

  • aUrl:

CheckProperties  override

Validates channel properties

procedure CheckProperties

CheckStatus    (declared in TROIndyUDPChannel)

Indicates whether an answer is received after an InvokeRequest.

function CheckStatus(const iMessageID: string): boolean

Parameters:

  • iMessageID: Value of the previously called InvokeRequest result

CleanUpStorages  protected virtual    (declared in TROIndyUDPChannel)

procedure CleanUpStorages

CopyStream  protected    (declared in TROIndyUDPChannel)

procedure CopyStream(aSource: TStream; aTarget: TStream)

Parameters:

  • aSource:
  • aTarget:

CreateUDPClient  protected virtual    (declared in TROIndyUDPChannel)

This internal method is responsible for creating underlying Indy object to use by the channel. Returns the object created.

function CreateUDPClient: TIdUDPClient

CurrentLocator    (declared in TROTransportChannel)

Returns which of the fail-over/load balancing servers configured in the ServerLocators is currently active. Depending on the DispatchOptions defined, this value might change with each request, or only if the current server fails.

property CurrentLocator: TROServerLocator read write

DecryptStream (TStream)  protected overload    (declared in TROBaseConnection)

procedure DecryptStream(const iStream: TStream)

Parameters:

  • iStream:

DecryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

procedure DecryptStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource:
  • aDest:

Dispatch (IROMessage)  protected reintroduce overload    (declared in TROTransportChannel)

Sends a request message through the Self channel for processing and gets back an aMessage. CodeGen uses this method when generating a [proxy](http://docs.rosdk.com/Understanding_the_Client_Side_(.NET_and_Delphi)#How does it work?) from RODL Files.

procedure Dispatch(aMessage: IROMessage)

Parameters:

  • aMessage: (In/out) message data

DispatchOptions    (declared in TROIndyUDPChannel)

Configures the available fail-over and load balancing options provided by the Remoting SDK. By default, channels are set up to talk to one specific server only. Two independent options are available to provide fail-over and load balancing: * Enables fail-over support. If the connection to any given server fails, the channel will automatically keep trying the next server specified in ServerLocators, until a working server is found or all servers have been tried. * Enables load-balancing support. Each request dispatched through the channel will go to a different server configured in ServerLocators, resulting in calls being more or less equally distributed over the available servers. Enabling any of these options obviously requires the server to be implemented in a stateless way, so that it does not depend on all requests from a client going to the same server. This implies using a class factory different from Per-Client and, if sessions are used, a session manager that allows sharing of session state between servers.

property DispatchOptions:

DoAfterProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServerEvent(const aServerLocator: TROServerLocator; const Failed: Boolean)

Parameters:

  • aServerLocator: Server locator
  • Failed:

DoAfterProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServers event

procedure DoAfterProbingServersEvent(const ProbedCount: integer; const EnabledCount: integer; const DisabledCount: integer)

Parameters:

  • ProbedCount:
  • EnabledCount:
  • DisabledCount:

DoBeforeDecryptEvent  protected virtual    (declared in TROBaseConnection) obsolete

procedure DoBeforeDecryptEvent(aEncryptedStream: TStream)

Parameters:

  • aEncryptedStream:

DoBeforeProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServer event

procedure DoBeforeProbingServerEvent(const aServerLocator: TROServerLocator)

Parameters:

  • aServerLocator: Server locator

DoBeforeProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServers event

procedure DoBeforeProbingServersEvent

DoDecryption  virtual    (declared in TROBaseConnection) obsolete

procedure DoDecryption(iCipherText: TStream; iPlainText: TStream)

Parameters:

  • iCipherText:
  • iPlainText:

DoEncryption  virtual    (declared in TROBaseConnection) obsolete

procedure DoEncryption(iPlainText: TStream; iCipherText: TStream)

Parameters:

  • iPlainText:
  • iCipherText:

DoEndOfThread  protected override

procedure DoEndOfThread(Sender: TROUDPResponseThread)

Parameters:

  • Sender:

DoException  protected virtual    (declared in TROTransportChannel)

Fires OnException event

procedure DoException(anException: Exception; var aRetry: Boolean)

Parameters:

  • anException:
  • aRetry:

DoOnTerminateThread  protected virtual    (declared in TROIndyUDPChannel)

procedure DoOnTerminateThread(Sender: TObject)

Parameters:

  • Sender:

DoReceiveStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnReceiveStream event

procedure DoReceiveStreamEvent(const aStream: TStream)

Parameters:

  • aStream: Stream

DoSendStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoSendStreamEvent(const aStream: TStream)

Parameters:

  • aStream: Stream

DoServerLocatorAssignmentEvent  protected virtual    (declared in TROTransportChannel)

Fires OnServerLocatorAssignment event

procedure DoServerLocatorAssignmentEvent(const aLocator: TROServerLocator; const aException: Exception)

Parameters:

  • aLocator:
  • aException:

Encryption    (declared in TROBaseConnection) obsolete

This is DES based enscryption, it is obsolete because works only for Delphi. Use message envelope AES Encryption Envelope instead.

property Encryption: TROEncryption read write

EncryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Encrypts given stream

procedure EncryptStream(const iStream: TStream)

Parameters:

  • iStream: Source and Destination

EncryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Encrypts given stream

procedure EncryptStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource: Source
  • aDest: Destination

FaultToleranceLocatorIdx    (declared in TROTransportChannel)

property FaultToleranceLocatorIdx: integer read write

GetNewMesgID  protected virtual    (declared in TROIndyUDPChannel)

function GetNewMesgID: string

GetResponseThreadClass  protected override

function GetResponseThreadClass: TROUDPResponseThreadClass

GetTransportObject  protected override    (declared in TROIndyUDPChannel)

Returns itself.

function GetTransportObject: TObject

Host    (declared in TROIndyUDPChannel)

Address of the server.

property Host: string read write

IndyClient    (declared in TROIndyUDPChannel)

Provides direct access to the underlying Indy implementation. You can use this property to control advanced settings on the Indy object. The available properties and settings depend on the version of Indy you are using.

property IndyClient: TIdUDPClient read write

InitServerLocator  protected virtual    (declared in TROTransportChannel)

Sets CurrentLocator

function InitServerLocator: Integer

InvokeRequest  protected virtual    (declared in TROIndyUDPChannel)

Invokes a request in async mode. The returned string is used in the CheckStatus invocation.

function InvokeRequest(aRequest: TStream; iGetResponse: boolean): string

Parameters:

  • aRequest: Request data
  • iGetResponse: Indicates whether a response to this request is expected

IsEncryptionUsed  protected    (declared in TROBaseConnection)

function IsEncryptionUsed: Boolean

isProbeMode  protected    (declared in TROTransportChannel)

Returns True if channel is used for probing purposes

property isProbeMode: Boolean read write

isStreamEncrypted  protected    (declared in TROBaseConnection)

Checks state of stream

function isStreamEncrypted(aStream: TStream): Boolean

Parameters:

  • aStream: Stream

LaunchAsyncTask  protected    (declared in TROTransportChannel)

procedure LaunchAsyncTask(aRequest: IROAsyncRequest)

Parameters:

  • aRequest:

LoadBalancerLocatorIdx    (declared in TROTransportChannel)

property LoadBalancerLocatorIdx: Integer read write

NotifyListners  protected

procedure NotifyListners(aServerIP: string; aResponseUID: string)

Parameters:

  • aServerIP:
  • aResponseUID:

OnAfterEncrypt    (declared in TROBaseConnection)

property OnAfterEncrypt: TROBaseConnectionOperation read write
delegate: procedure OnAfterEncrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnAfterProbingServer    (declared in TROTransportChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer: TROEndProbeServerEvent read write
delegate: procedure OnAfterProbingServer(Sender: TROTransportChannel; aServerLocator: TROServerLocator; Failed: boolean)

OnAfterProbingServer    (declared in TROIndyUDPChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer:

OnAfterProbingServers    (declared in TROTransportChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers: TROEndProbeServersEvent read write
delegate: procedure OnAfterProbingServers(Sender: TROTransportChannel; ProbedCount: integer; EnabledCount: integer; DisabledCount: integer)

OnAfterProbingServers    (declared in TROIndyUDPChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers:

OnAsyncException    (declared in TROTransportChannel)

Fires when exception is raised in asynchronous mode

property OnAsyncException: TROAsyncExceptionEvent read write
delegate: procedure OnAsyncException(Sender: TROTransportChannel; Async: IROAsyncInterface; anException: Exception)

OnAsyncResponseTimeOut    (declared in TROIndyUDPChannel)

Fires if no response for an asynchronous call is received within the timeframe specified by the AsyncTimeOut property. Due to the nature of asynchronous calls, no exception will be raised.

property OnAsyncResponseTimeOut: TROAsyncTimeOutEvent read write
delegate: procedure OnAsyncResponseTimeOut(aRequistUID: string)

OnBeforeDecrypt    (declared in TROBaseConnection)

property OnBeforeDecrypt: TROBaseConnectionOperation read write
delegate: procedure OnBeforeDecrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnBeforeProbingServer    (declared in TROTransportChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to: * check or adjust the server configuration * to include/exclude the server from being probed by changing the TROServerLocator property.

property OnBeforeProbingServer: TROBeginProbeServerEvent read write
delegate: procedure OnBeforeProbingServer(Sender: TROTransportChannel; aServerLocator: TROServerLocator)

OnBeforeProbingServer    (declared in TROIndyUDPChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to: * check or adjust the server configuration * to include/exclude the server from being probed by changing the TROServerLocator property.

property OnBeforeProbingServer:

OnBeforeProbingServers    (declared in TROTransportChannel)

Fires before the channel starts probing all servers for availability. You can use this event: * to check or adjust the server configurations * to include/exclude individual server from being probed by changing their TROServerLocator properties.

property OnBeforeProbingServers: TROBeginProbeServersEvent read write
delegate: procedure OnBeforeProbingServers(Sender: TROTransportChannel)

OnBeforeProbingServers    (declared in TROIndyUDPChannel)

Fires before the channel starts probing all servers for availability. You can use this event: * to check or adjust the server configurations * to include/exclude individual server from being probed by changing their TROServerLocator properties.

property OnBeforeProbingServers:

OnBroadcastResponseReceived

Fires for each response that is received. The ResponseUID passed can be used to obtain the actual response data, using the ResponseStorage.GetRespByUID method.

property OnBroadcastResponseReceived: TROResponseReceivedEvent read write
delegate: procedure OnBroadcastResponseReceived(ServerIP: string; ResponseUID: string)

OnException    (declared in TROTransportChannel)

Fires if an exception is raised during the execution of a remote request. This could be an exception returned from the server, a communication problem or an error within the client. Depending on the type of error, your event handler can try to rectify the problem, and set aRetry to true to have the channel try and perform the request again. For example, an application could show a dialog asking the user to confirm if his internet connection is available, with Cancel and Retry buttons.
If aRetry is set to true and the call succeeds at the second attempt, the call will return to the original code that initiated the request, as if the exception never happened.

property OnException: TROExceptionEvent read write
delegate: procedure OnException(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnLoginNeeded    (declared in TROTransportChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded: TROExceptionEvent read write
delegate: procedure OnLoginNeeded(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnLoginNeeded    (declared in TROIndyUDPChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded:

OnProgress    (declared in TROTransportChannel)

This event fires as the channel is transferring data for a request or response to or from the server, informing of the current progress. It can be used to keep the user interface updated during lengthy transfers,e.g. by showing a progress bar or the remaining transfer volume. Note: the accuracy and frequency of calls to OnProgress depends on the channel type; since channels transport data packets in different sized chunks (or even all-at-once), OnProgress might show a very fine progress for some channels, while jumping from 0 to 100% in one step with others.

property OnProgress: TProgressEvent read write
delegate: procedure OnProgress(iSender: TObject; iType: TProgressType; iDirection: TProgressDirection; iTransferred: integer; iTotal: integer)

OnReceiveStream    (declared in TROTransportChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream: TStreamDispatch read write
delegate: procedure OnReceiveStream(aStream: TStream)

OnReceiveStream    (declared in TROIndyUDPChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream:

OnSendStream    (declared in TROTransportChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream: TStreamDispatch read write
delegate: procedure OnSendStream(aStream: TStream)

OnSendStream    (declared in TROIndyUDPChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream:

OnServerLocatorAssignment    (declared in TROTransportChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment: TServerLocatorAssignment read write
delegate: procedure OnServerLocatorAssignment(Sender: TROTransportChannel; aLocator: TROServerLocator; aException: Exception)

OnServerLocatorAssignment    (declared in TROIndyUDPChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment:

Port    (declared in TROIndyUDPChannel)

The server's port number (default for Remoting SDK TCP servers is 8090).

property Port: integer read write

Probe  protected    (declared in TROTransportChannel)

Checks the accessibility of servers from the ServerLocators. This method is intended to provide fail-over and load balancing support in the Remoting SDK Architecture.

function Probe(aServerLocator: TROServerLocator): boolean

Parameters:

  • aServerLocator: Server locator

ProbeAll  protected    (declared in TROTransportChannel)

Checks the availability of all known servers.

procedure ProbeAll

ProbeFrequency    (declared in TROIndyUDPChannel)

Sets at what intervals, in milliseconds, the channel will probe the servers configured in ServerLocators for availability. The default value is 60,000 (60 seconds). See the ProbeServers property for a more detailed description. Although somewhat misnamed, this property defines the Interval between probes, not the actual probing Frequency. The property name is persisted for backward compatibility.

property ProbeFrequency:

ProbeServers    (declared in TROIndyUDPChannel)

Toggles whether the channel will continuously probe the servers configured in ServerLocators for availability. If enabled (true), the channel will ping all servers at a regular interval to determine if they are reachable. If a server fails to respond, it will be disabled for future calls until a later probe can reach it again. The interval between probes can be configured using the ProbeFrequency property. By default, server probing is turned off.

property ProbeServers:

ReceiveResp  override

function ReceiveResp(aTimeOut: Integer): Boolean

Parameters:

  • aTimeOut:

RegisterResponseListner

procedure RegisterResponseListner(aListner: IROBroadcastNotification)

Parameters:

  • aListner:

RequestStorage    (declared in TROIndyUDPChannel)

property RequestStorage: TROSimpleAsyncResponseStorage read write

ResetProbingClone  protected virtual    (declared in TROTransportChannel)

Resets channel that is used for probing

procedure ResetProbingClone(aProbe: TROTransportChannel)

Parameters:

  • aProbe: Probing clone

ResponseStorage    (declared in TROIndyUDPChannel)

property ResponseStorage: TROSimpleAsyncResponseStorage read write

RetrieveMetadata  protected virtual    (declared in TROTransportChannel)

Retrieves metadata from server

procedure RetrieveMetadata(out Metadata: TStream)

Parameters:

  • Metadata: Destination stream

RetrieveResponse  protected    (declared in TROIndyUDPChannel)

Retrieves a response.

procedure RetrieveResponse(const iMessageID: string; aResponse: TStream)

Parameters:

  • iMessageID: Id of a waiting response
  • aResponse: Response data

RetrieveRODL  protected    (declared in TROTransportChannel)

This method is used for to obtaining the RODL library from the server without havin to rely on a channel-specific mechanism (such as a HTTP request to http://servername:port/rodl).

procedure RetrieveRODL(out RODLLibrary: TRODLLibrary)

Parameters:

  • RODLLibrary: Result

Retrys    (declared in TROIndyUDPChannel)

property Retrys: Integer read write

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

SendReq  protected override

procedure SendReq(aRequest: TStream; UID: string; AddToStorage: Boolean)

Parameters:

  • aRequest:
  • UID:
  • AddToStorage:

ServerLocators    (declared in TROIndyUDPChannel)

Optionally, this collection property can be filled to contain a list of possible servers to be used for fail-over or load balancing purposes. Depending on the settings configured in DispatchOptions, the channel will automatically spread calls over the available servers, or fall back to another server if one fails.

property ServerLocators:

SetAsyncBusy  protected virtual    (declared in TROTransportChannel)

procedure SetAsyncBusy(const Value: Boolean)

Parameters:

  • Value:

SetRetrys  protected    (declared in TROIndyUDPChannel)

procedure SetRetrys(const Value: Integer)

Parameters:

  • Value:

SetServerLocator  protected    (declared in TROTransportChannel)

Retrieves the location details of a server from aServerLocator.

procedure SetServerLocator(aServerLocator: TROServerLocator; anException: Exception)

Parameters:

  • aServerLocator: Configuration data of the server
  • anException: Exception

StripID  protected    (declared in TROIndyUDPChannel)

function StripID(var aResponse: TBytes): TBytes

Parameters:

  • aResponse:

SynchronizedProbing    (declared in TROIndyUDPChannel)

Determines whether server probing happens in the context of the main VCL thread (true, default) or in a background worker thread. See the ProbeServers property for a more detailed description.

property SynchronizedProbing:

TargetUri    (declared in TROTransportChannel)

Target URI

property TargetUri: TROUri read write

TargetUrl  protected    (declared in TROTransportChannel)

The address of the server.

property TargetUrl: string read write

ThreadSafe  protected    (declared in TROTransportChannel)

property ThreadSafe: Boolean read write

TriggerProgress  protected virtual    (declared in TROTransportChannel)

Fires OnProgress event

procedure TriggerProgress(iType: TProgressType; iDirection: TProgressDirection; iTransfered: integer; iTotal: integer)

Parameters:

  • iType: progress type
  • iDirection: direction
  • iTransfered: transfered bytes
  • iTotal: total bytes

UnRegisterResponseListner

procedure UnRegisterResponseListner(aListner: IROBroadcastNotification)

Parameters:

  • aListner:

 

AsyncSynchronizeResponse    (declared in TROIndyUDPChannel)

property AsyncSynchronizeResponse: Boolean read write

AsyncTimeOut    (declared in TROIndyUDPChannel)

During this period of tome in milliseconds, an asynchronous response from the server will be waiting. The default value is 1000 (1 second). If no response is received from the server after the given timeout, the OnAsyncResponseTimeout event will fire. Due to the nature of asynchronous calls, no exception will be raised.

property AsyncTimeOut: Integer read write

Busy    (declared in TROTransportChannel)

Informs whether the channel is currently busy executing a remote request (true) or not (false). Most channels (except most notably the TROSuperTCPChannel) are only capable of performing one request at a time; if a second request is attempted while the channel is Busy, an EROChannelBusy exception will be raised.

property Busy: boolean read write

CurrentLocator    (declared in TROTransportChannel)

Returns which of the fail-over/load balancing servers configured in the ServerLocators is currently active. Depending on the DispatchOptions defined, this value might change with each request, or only if the current server fails.

property CurrentLocator: TROServerLocator read write

DispatchOptions    (declared in TROIndyUDPChannel)

Configures the available fail-over and load balancing options provided by the Remoting SDK. By default, channels are set up to talk to one specific server only. Two independent options are available to provide fail-over and load balancing: * Enables fail-over support. If the connection to any given server fails, the channel will automatically keep trying the next server specified in ServerLocators, until a working server is found or all servers have been tried. * Enables load-balancing support. Each request dispatched through the channel will go to a different server configured in ServerLocators, resulting in calls being more or less equally distributed over the available servers. Enabling any of these options obviously requires the server to be implemented in a stateless way, so that it does not depend on all requests from a client going to the same server. This implies using a class factory different from Per-Client and, if sessions are used, a session manager that allows sharing of session state between servers.

property DispatchOptions:

Encryption    (declared in TROBaseConnection) obsolete

This is DES based enscryption, it is obsolete because works only for Delphi. Use message envelope AES Encryption Envelope instead.

property Encryption: TROEncryption read write

FaultToleranceLocatorIdx    (declared in TROTransportChannel)

property FaultToleranceLocatorIdx: integer read write

Host    (declared in TROIndyUDPChannel)

Address of the server.

property Host: string read write

IndyClient    (declared in TROIndyUDPChannel)

Provides direct access to the underlying Indy implementation. You can use this property to control advanced settings on the Indy object. The available properties and settings depend on the version of Indy you are using.

property IndyClient: TIdUDPClient read write

isProbeMode  protected    (declared in TROTransportChannel)

Returns True if channel is used for probing purposes

property isProbeMode: Boolean read write

LoadBalancerLocatorIdx    (declared in TROTransportChannel)

property LoadBalancerLocatorIdx: Integer read write

OnAfterProbingServer    (declared in TROIndyUDPChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer:

OnAfterProbingServers    (declared in TROIndyUDPChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers:

OnBeforeProbingServer    (declared in TROIndyUDPChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to: * check or adjust the server configuration * to include/exclude the server from being probed by changing the TROServerLocator property.

property OnBeforeProbingServer:

OnBeforeProbingServers    (declared in TROIndyUDPChannel)

Fires before the channel starts probing all servers for availability. You can use this event: * to check or adjust the server configurations * to include/exclude individual server from being probed by changing their TROServerLocator properties.

property OnBeforeProbingServers:

OnLoginNeeded    (declared in TROIndyUDPChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded:

OnReceiveStream    (declared in TROIndyUDPChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream:

OnSendStream    (declared in TROIndyUDPChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream:

OnServerLocatorAssignment    (declared in TROIndyUDPChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment:

Port    (declared in TROIndyUDPChannel)

The server's port number (default for Remoting SDK TCP servers is 8090).

property Port: integer read write

ProbeFrequency    (declared in TROIndyUDPChannel)

Sets at what intervals, in milliseconds, the channel will probe the servers configured in ServerLocators for availability. The default value is 60,000 (60 seconds). See the ProbeServers property for a more detailed description. Although somewhat misnamed, this property defines the Interval between probes, not the actual probing Frequency. The property name is persisted for backward compatibility.

property ProbeFrequency:

ProbeServers    (declared in TROIndyUDPChannel)

Toggles whether the channel will continuously probe the servers configured in ServerLocators for availability. If enabled (true), the channel will ping all servers at a regular interval to determine if they are reachable. If a server fails to respond, it will be disabled for future calls until a later probe can reach it again. The interval between probes can be configured using the ProbeFrequency property. By default, server probing is turned off.

property ProbeServers:

RequestStorage    (declared in TROIndyUDPChannel)

property RequestStorage: TROSimpleAsyncResponseStorage read write

ResponseStorage    (declared in TROIndyUDPChannel)

property ResponseStorage: TROSimpleAsyncResponseStorage read write

Retrys    (declared in TROIndyUDPChannel)

property Retrys: Integer read write

ServerLocators    (declared in TROIndyUDPChannel)

Optionally, this collection property can be filled to contain a list of possible servers to be used for fail-over or load balancing purposes. Depending on the settings configured in DispatchOptions, the channel will automatically spread calls over the available servers, or fall back to another server if one fails.

property ServerLocators:

SynchronizedProbing    (declared in TROIndyUDPChannel)

Determines whether server probing happens in the context of the main VCL thread (true, default) or in a background worker thread. See the ProbeServers property for a more detailed description.

property SynchronizedProbing:

TargetUri    (declared in TROTransportChannel)

Target URI

property TargetUri: TROUri read write

TargetUrl  protected    (declared in TROTransportChannel)

The address of the server.

property TargetUrl: string read write

ThreadSafe  protected    (declared in TROTransportChannel)

property ThreadSafe: Boolean read write

 

ChannelMatchingTargetUri    (declared in TROTransportChannel)

Creates a client channel instance with type, target host and target port matching the provided target Uri. F.e. for provided uri supertcp://192.168.1.100:7020/bin this method will return an instance of the Super Tcp channel with target host set to 192.168.1.100 and port set to 7020.

class function ChannelMatchingTargetUri(const aUri: TROUri): TROTransportChannel

Parameters:

  • aUri: Server Uri

ChannelMatchingTargetUrl    (declared in TROTransportChannel)

class function ChannelMatchingTargetUrl(const aUrl: string): TROTransportChannel

Parameters:

  • aUrl:

 

constructor Create  override

Creates a new instance.

constructor Create(AOwner: TComponent)

Parameters:

  • AOwner: Owner.

AddRequestToStorage  protected    (declared in TROIndyUDPChannel)

procedure AddRequestToStorage(aRequest: TStream; aRequestID: string)

Parameters:

  • aRequest:
  • aRequestID:

Assign  override    (declared in TROTransportChannel)

Copies the contents of another, similar object.

procedure Assign(aSource: TPersistent)

Parameters:

  • aSource: Instance whose properties will be copied

AssignEvents  protected override

Copies the events of another, similar object.

procedure AssignEvents(aSource: TROTransportChannel)

Parameters:

  • aSource:

AssignSpecificProperties  protected override    (declared in TROIndyUDPChannel)

Copies the specific properties of another, similar object.

procedure AssignSpecificProperties(aSource: TROTransportChannel)

Parameters:

  • aSource:

AsyncException  protected virtual    (declared in TROTransportChannel)

Notifies about an exception in an asynchronous mode.

procedure AsyncException(aAsyncInterface: IROAsyncInterface; AsyncException: Exception)

Parameters:

  • aAsyncInterface: Exception source
  • AsyncException: Exception data

BeforeDispatch  protected virtual    (declared in TROTransportChannel)

Allows an implimentation to do necessary preparatory actions (checking the readiness of the channel, restore session data, etc.).

procedure BeforeDispatch(aMessage: IROMessage)

Parameters:


ChangeServerLocator  protected virtual    (declared in TROTransportChannel)

procedure ChangeServerLocator(var faultstartlocatoridx: integer; var aRetry: Boolean; const aException: Exception)

Parameters:

  • faultstartlocatoridx:
  • aRetry:
  • aException:

CheckProperties  override

Validates channel properties

procedure CheckProperties

CheckStatus    (declared in TROIndyUDPChannel)

Indicates whether an answer is received after an InvokeRequest.

function CheckStatus(const iMessageID: string): boolean

Parameters:

  • iMessageID: Value of the previously called InvokeRequest result

CleanUpStorages  protected virtual    (declared in TROIndyUDPChannel)

procedure CleanUpStorages

CopyStream  protected    (declared in TROIndyUDPChannel)

procedure CopyStream(aSource: TStream; aTarget: TStream)

Parameters:

  • aSource:
  • aTarget:

CreateUDPClient  protected virtual    (declared in TROIndyUDPChannel)

This internal method is responsible for creating underlying Indy object to use by the channel. Returns the object created.

function CreateUDPClient: TIdUDPClient

DecryptStream (TStream)  protected overload    (declared in TROBaseConnection)

procedure DecryptStream(const iStream: TStream)

Parameters:

  • iStream:

DecryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

procedure DecryptStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource:
  • aDest:

Dispatch (IROMessage)  protected reintroduce overload    (declared in TROTransportChannel)

Sends a request message through the Self channel for processing and gets back an aMessage. CodeGen uses this method when generating a [proxy](http://docs.rosdk.com/Understanding_the_Client_Side_(.NET_and_Delphi)#How does it work?) from RODL Files.

procedure Dispatch(aMessage: IROMessage)

Parameters:

  • aMessage: (In/out) message data

DoAfterProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServer event

procedure DoAfterProbingServerEvent(const aServerLocator: TROServerLocator; const Failed: Boolean)

Parameters:

  • aServerLocator: Server locator
  • Failed:

DoAfterProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnAfterProbingServers event

procedure DoAfterProbingServersEvent(const ProbedCount: integer; const EnabledCount: integer; const DisabledCount: integer)

Parameters:

  • ProbedCount:
  • EnabledCount:
  • DisabledCount:

DoBeforeDecryptEvent  protected virtual    (declared in TROBaseConnection) obsolete

procedure DoBeforeDecryptEvent(aEncryptedStream: TStream)

Parameters:

  • aEncryptedStream:

DoBeforeProbingServerEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServer event

procedure DoBeforeProbingServerEvent(const aServerLocator: TROServerLocator)

Parameters:

  • aServerLocator: Server locator

DoBeforeProbingServersEvent  protected virtual    (declared in TROTransportChannel)

Fires OnBeforeProbingServers event

procedure DoBeforeProbingServersEvent

DoDecryption  virtual    (declared in TROBaseConnection) obsolete

procedure DoDecryption(iCipherText: TStream; iPlainText: TStream)

Parameters:

  • iCipherText:
  • iPlainText:

DoEncryption  virtual    (declared in TROBaseConnection) obsolete

procedure DoEncryption(iPlainText: TStream; iCipherText: TStream)

Parameters:

  • iPlainText:
  • iCipherText:

DoEndOfThread  protected override

procedure DoEndOfThread(Sender: TROUDPResponseThread)

Parameters:

  • Sender:

DoException  protected virtual    (declared in TROTransportChannel)

Fires OnException event

procedure DoException(anException: Exception; var aRetry: Boolean)

Parameters:

  • anException:
  • aRetry:

DoOnTerminateThread  protected virtual    (declared in TROIndyUDPChannel)

procedure DoOnTerminateThread(Sender: TObject)

Parameters:

  • Sender:

DoReceiveStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnReceiveStream event

procedure DoReceiveStreamEvent(const aStream: TStream)

Parameters:

  • aStream: Stream

DoSendStreamEvent  protected virtual    (declared in TROTransportChannel)

Fires OnSendStream event

procedure DoSendStreamEvent(const aStream: TStream)

Parameters:

  • aStream: Stream

DoServerLocatorAssignmentEvent  protected virtual    (declared in TROTransportChannel)

Fires OnServerLocatorAssignment event

procedure DoServerLocatorAssignmentEvent(const aLocator: TROServerLocator; const aException: Exception)

Parameters:

  • aLocator:
  • aException:

EncryptStream (TStream)  protected overload    (declared in TROBaseConnection)

Encrypts given stream

procedure EncryptStream(const iStream: TStream)

Parameters:

  • iStream: Source and Destination

EncryptStream (TStream, TStream)  protected overload    (declared in TROBaseConnection)

Encrypts given stream

procedure EncryptStream(const aSource: TStream; const aDest: TStream)

Parameters:

  • aSource: Source
  • aDest: Destination

GetNewMesgID  protected virtual    (declared in TROIndyUDPChannel)

function GetNewMesgID: string

GetResponseThreadClass  protected override

function GetResponseThreadClass: TROUDPResponseThreadClass

GetTransportObject  protected override    (declared in TROIndyUDPChannel)

Returns itself.

function GetTransportObject: TObject

InitServerLocator  protected virtual    (declared in TROTransportChannel)

Sets CurrentLocator

function InitServerLocator: Integer

InvokeRequest  protected virtual    (declared in TROIndyUDPChannel)

Invokes a request in async mode. The returned string is used in the CheckStatus invocation.

function InvokeRequest(aRequest: TStream; iGetResponse: boolean): string

Parameters:

  • aRequest: Request data
  • iGetResponse: Indicates whether a response to this request is expected

IsEncryptionUsed  protected    (declared in TROBaseConnection)

function IsEncryptionUsed: Boolean

isStreamEncrypted  protected    (declared in TROBaseConnection)

Checks state of stream

function isStreamEncrypted(aStream: TStream): Boolean

Parameters:

  • aStream: Stream

LaunchAsyncTask  protected    (declared in TROTransportChannel)

procedure LaunchAsyncTask(aRequest: IROAsyncRequest)

Parameters:

  • aRequest:

NotifyListners  protected

procedure NotifyListners(aServerIP: string; aResponseUID: string)

Parameters:

  • aServerIP:
  • aResponseUID:

Probe  protected    (declared in TROTransportChannel)

Checks the accessibility of servers from the ServerLocators. This method is intended to provide fail-over and load balancing support in the Remoting SDK Architecture.

function Probe(aServerLocator: TROServerLocator): boolean

Parameters:

  • aServerLocator: Server locator

ProbeAll  protected    (declared in TROTransportChannel)

Checks the availability of all known servers.

procedure ProbeAll

ReceiveResp  override

function ReceiveResp(aTimeOut: Integer): Boolean

Parameters:

  • aTimeOut:

RegisterResponseListner

procedure RegisterResponseListner(aListner: IROBroadcastNotification)

Parameters:

  • aListner:

ResetProbingClone  protected virtual    (declared in TROTransportChannel)

Resets channel that is used for probing

procedure ResetProbingClone(aProbe: TROTransportChannel)

Parameters:

  • aProbe: Probing clone

RetrieveMetadata  protected virtual    (declared in TROTransportChannel)

Retrieves metadata from server

procedure RetrieveMetadata(out Metadata: TStream)

Parameters:

  • Metadata: Destination stream

RetrieveResponse  protected    (declared in TROIndyUDPChannel)

Retrieves a response.

procedure RetrieveResponse(const iMessageID: string; aResponse: TStream)

Parameters:

  • iMessageID: Id of a waiting response
  • aResponse: Response data

RetrieveRODL  protected    (declared in TROTransportChannel)

This method is used for to obtaining the RODL library from the server without havin to rely on a channel-specific mechanism (such as a HTTP request to http://servername:port/rodl).

procedure RetrieveRODL(out RODLLibrary: TRODLLibrary)

Parameters:

  • RODLLibrary: Result

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

SendReq  protected override

procedure SendReq(aRequest: TStream; UID: string; AddToStorage: Boolean)

Parameters:

  • aRequest:
  • UID:
  • AddToStorage:

SetAsyncBusy  protected virtual    (declared in TROTransportChannel)

procedure SetAsyncBusy(const Value: Boolean)

Parameters:

  • Value:

SetRetrys  protected    (declared in TROIndyUDPChannel)

procedure SetRetrys(const Value: Integer)

Parameters:

  • Value:

SetServerLocator  protected    (declared in TROTransportChannel)

Retrieves the location details of a server from aServerLocator.

procedure SetServerLocator(aServerLocator: TROServerLocator; anException: Exception)

Parameters:

  • aServerLocator: Configuration data of the server
  • anException: Exception

StripID  protected    (declared in TROIndyUDPChannel)

function StripID(var aResponse: TBytes): TBytes

Parameters:

  • aResponse:

TriggerProgress  protected virtual    (declared in TROTransportChannel)

Fires OnProgress event

procedure TriggerProgress(iType: TProgressType; iDirection: TProgressDirection; iTransfered: integer; iTotal: integer)

Parameters:

  • iType: progress type
  • iDirection: direction
  • iTransfered: transfered bytes
  • iTotal: total bytes

UnRegisterResponseListner

procedure UnRegisterResponseListner(aListner: IROBroadcastNotification)

Parameters:

  • aListner:

 

OnAfterEncrypt    (declared in TROBaseConnection)

property OnAfterEncrypt: TROBaseConnectionOperation read write
delegate: procedure OnAfterEncrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnAfterProbingServer    (declared in TROTransportChannel)

Fires after the channel is done probing a specific server for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServer: TROEndProbeServerEvent read write
delegate: procedure OnAfterProbingServer(Sender: TROTransportChannel; aServerLocator: TROServerLocator; Failed: boolean)

OnAfterProbingServers    (declared in TROTransportChannel)

Fires after the channel is done probing all servers for availability. You can use this event to check the result of the probing, possibly to update internal data structures or to display server status in the user interface.

property OnAfterProbingServers: TROEndProbeServersEvent read write
delegate: procedure OnAfterProbingServers(Sender: TROTransportChannel; ProbedCount: integer; EnabledCount: integer; DisabledCount: integer)

OnAsyncException    (declared in TROTransportChannel)

Fires when exception is raised in asynchronous mode

property OnAsyncException: TROAsyncExceptionEvent read write
delegate: procedure OnAsyncException(Sender: TROTransportChannel; Async: IROAsyncInterface; anException: Exception)

OnAsyncResponseTimeOut    (declared in TROIndyUDPChannel)

Fires if no response for an asynchronous call is received within the timeframe specified by the AsyncTimeOut property. Due to the nature of asynchronous calls, no exception will be raised.

property OnAsyncResponseTimeOut: TROAsyncTimeOutEvent read write
delegate: procedure OnAsyncResponseTimeOut(aRequistUID: string)

OnBeforeDecrypt    (declared in TROBaseConnection)

property OnBeforeDecrypt: TROBaseConnectionOperation read write
delegate: procedure OnBeforeDecrypt(Sender: TROBaseConnection; aEncryptedStream: TStream)

OnBeforeProbingServer    (declared in TROTransportChannel)

Fires before the channel starts probing a specific server for availability. You can use this event to: * check or adjust the server configuration * to include/exclude the server from being probed by changing the TROServerLocator property.

property OnBeforeProbingServer: TROBeginProbeServerEvent read write
delegate: procedure OnBeforeProbingServer(Sender: TROTransportChannel; aServerLocator: TROServerLocator)

OnBeforeProbingServers    (declared in TROTransportChannel)

Fires before the channel starts probing all servers for availability. You can use this event: * to check or adjust the server configurations * to include/exclude individual server from being probed by changing their TROServerLocator properties.

property OnBeforeProbingServers: TROBeginProbeServersEvent read write
delegate: procedure OnBeforeProbingServers(Sender: TROTransportChannel)

OnBroadcastResponseReceived

Fires for each response that is received. The ResponseUID passed can be used to obtain the actual response data, using the ResponseStorage.GetRespByUID method.

property OnBroadcastResponseReceived: TROResponseReceivedEvent read write
delegate: procedure OnBroadcastResponseReceived(ServerIP: string; ResponseUID: string)

OnException    (declared in TROTransportChannel)

Fires if an exception is raised during the execution of a remote request. This could be an exception returned from the server, a communication problem or an error within the client. Depending on the type of error, your event handler can try to rectify the problem, and set aRetry to true to have the channel try and perform the request again. For example, an application could show a dialog asking the user to confirm if his internet connection is available, with Cancel and Retry buttons.
If aRetry is set to true and the call succeeds at the second attempt, the call will return to the original code that initiated the request, as if the exception never happened.

property OnException: TROExceptionEvent read write
delegate: procedure OnException(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnLoginNeeded    (declared in TROTransportChannel)

Fires if an EROSessionNotFound (or the descendant SessionNotFoundException) exception is raised during the execution of a remote request. This usually indicates that the server cannot authenticate the client or that the session has expired. The most common use for this event is to perform a call to a special Login service provided by the server (possibly after prompting the user to enter username and password), and to set the aRetry parameter to true if login was successful.

property OnLoginNeeded: TROExceptionEvent read write
delegate: procedure OnLoginNeeded(Sender: TROTransportChannel; anException: Exception; var aRetry: Boolean)

OnProgress    (declared in TROTransportChannel)

This event fires as the channel is transferring data for a request or response to or from the server, informing of the current progress. It can be used to keep the user interface updated during lengthy transfers,e.g. by showing a progress bar or the remaining transfer volume. Note: the accuracy and frequency of calls to OnProgress depends on the channel type; since channels transport data packets in different sized chunks (or even all-at-once), OnProgress might show a very fine progress for some channels, while jumping from 0 to 100% in one step with others.

property OnProgress: TProgressEvent read write
delegate: procedure OnProgress(iSender: TObject; iType: TProgressType; iDirection: TProgressDirection; iTransferred: integer; iTotal: integer)

OnReceiveStream    (declared in TROTransportChannel)

Fires after a stream with a response message has been received from the server. Use this event handler to inspect and possibly modify the stream, before it continues to be processed by the higher levels of the Remoting SDK framework.

property OnReceiveStream: TStreamDispatch read write
delegate: procedure OnReceiveStream(aStream: TStream)

OnSendStream    (declared in TROTransportChannel)

Fires just as a stream with a request message will be sent to the server. The event handler can inspect and possibly modify the stream, before it continues to be sent off to the server.

property OnSendStream: TStreamDispatch read write
delegate: procedure OnSendStream(aStream: TStream)

OnServerLocatorAssignment    (declared in TROTransportChannel)

Fires before changing of a server locator.

property OnServerLocatorAssignment: TServerLocatorAssignment read write
delegate: procedure OnServerLocatorAssignment(Sender: TROTransportChannel; aLocator: TROServerLocator; aException: Exception)