TRODiscoveryServerManager
Overview
This class is a part of Service Discovery infrastructure. It is a specialized collection to store a list of available discovery servers.
There is a DiscoveryServerManager global variable intruduced in the uRODiscovery unit. This looks like the only place users can interact with this class.
Location
- Unit: uRODiscoveryServer.pas
- Ancestry: TObjectList<TROCustomDiscoveryServer> | TRODiscoveryServerManager
Instance Methods
constructor Create
Creates a new instance.
constructor Create
FindService
Allows to find a service by name looking through the all discovery servers registered in the collection.
The return value is the server address in the string form.
function FindService(const iName: string; var ioDiscoveryOptions: TRODiscoveryOptions; var ioHandled: Boolean): string
Parameters:
- iName: The service name to find.
- ioDiscoveryOptions: The discovery options object, TRODiscoveryOptions descendant.
- ioHandled: The boolean out parameter that will contain true if the serach was successfull and the service was located, otherwise will contain false.
RegisterDiscoveryServer
Registers a new discovery server to the collection.
procedure RegisterDiscoveryServer(iDiscoveryServer: TROCustomDiscoveryServer)
Parameters:
- iDiscoveryServer: The server to register.
UnregisterDiscoveryServer
Unregisters a discovery server and removes it from the collection.
procedure UnregisterDiscoveryServer(iDiscoveryServer: TROCustomDiscoveryServer)
Parameters:
- iDiscoveryServer: The server to unregister.