TROCustomDiscoveryClient
Overview
This class implements the client side of the local network server discovery infrastructure in the Remoting SDK.
Location
- Unit: uRODiscovery.pas
- Ancestry: TComponent | TROComponent | TROCustomDiscoveryClient
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
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
Notification protected override
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
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 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
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
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
ServiceName
The service name to look for on the local network.
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
CheckProperties
Validates the discovery client properties.
procedure CheckProperties
Notification protected override
Forwards notification messages to all owned components.
procedure Notification(aComponent: TComponent; Operation: TOperation)
Parameters:
- aComponent: component
- Operation: operation
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 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
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)