TROCustomDiscoveryClient

Overview

This class implements the client side of the local network server discovery infrastructure in the Remoting SDK.

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

Channel

Specifies the TROBroadcastChannel to use to locate servers.

property Channel: TROBroadcastChannel read write

CheckProperties

Validates the discovery client properties.

procedure CheckProperties

Message

Specifies the message format to use to talk to the servers.

property Message: TROMessage read write

OnDiscoveryException

Fires if any exception was raised while probing for servers. If an event handler is assigned, exceptions will not be re-raised after the event handler has executed.

property OnDiscoveryException: TRODiscoveryException read write
delegate: procedure OnDiscoveryException(aSender: TObject; aException: Exception)

OnNewServersFound

Fires whenever the ServerList has been updated; whether new servers have been found or old servers have been removed.

property OnNewServersFound: TNotifyEvent read write

OnNewServiceFound

Fires whenever the ServerList has been updated; whether new servers have been found or old servers have been removed.

property OnNewServiceFound: TRODiscoveryNewServiceFoundEvent read write
delegate: procedure OnNewServiceFound(aSender: TObject; aName: string; aDiscoveryOptions: TRODiscoveryOptions)

RefreshServerList

Performs a network broadcast to find new servers. If needed, a user-defined TRODiscoveryOptions descendant might be passed to the server to provide additional details or requirements for the desired service.

As responses from servers come in, the ServerList property is filled and the OnNewServiceFound and OnNewServersFound events are fired.

procedure RefreshServerList(aDiscoveryOptions: TRODiscoveryOptions)

Parameters:

  • aDiscoveryOptions: options

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

ServerList

The list of servers that have been found to provide the requested service. Call the RefreshServerList to (re)query the network and find new servers.

property ServerList: TStrings read write

ServiceName

The service name to look for on the local network.

property ServiceName: string read write

 

Channel

Specifies the TROBroadcastChannel to use to locate servers.

property Channel: TROBroadcastChannel read write

Message

Specifies the message format to use to talk to the servers.

property Message: TROMessage read write

ServerList

The list of servers that have been found to provide the requested service. Call the RefreshServerList to (re)query the network and find new servers.

property ServerList: TStrings read write

ServiceName

The service name to look for on the local network.

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

CheckProperties

Validates the discovery client properties.

procedure CheckProperties

RefreshServerList

Performs a network broadcast to find new servers. If needed, a user-defined TRODiscoveryOptions descendant might be passed to the server to provide additional details or requirements for the desired service.

As responses from servers come in, the ServerList property is filled and the OnNewServiceFound and OnNewServersFound events are fired.

procedure RefreshServerList(aDiscoveryOptions: TRODiscoveryOptions)

Parameters:

  • aDiscoveryOptions: options

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

 

OnDiscoveryException

Fires if any exception was raised while probing for servers. If an event handler is assigned, exceptions will not be re-raised after the event handler has executed.

property OnDiscoveryException: TRODiscoveryException read write
delegate: procedure OnDiscoveryException(aSender: TObject; aException: Exception)

OnNewServersFound

Fires whenever the ServerList has been updated; whether new servers have been found or old servers have been removed.

property OnNewServersFound: TNotifyEvent read write

OnNewServiceFound

Fires whenever the ServerList has been updated; whether new servers have been found or old servers have been removed.

property OnNewServiceFound: TRODiscoveryNewServiceFoundEvent read write
delegate: procedure OnNewServiceFound(aSender: TObject; aName: string; aDiscoveryOptions: TRODiscoveryOptions)

Descendants

See Also