Datasnap.Win.ObjBrkr.TSimpleObjectBroker.GetComputerForGUID

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetComputerForGUID(GUID: TGUID): string; override;

C++

virtual System::UnicodeString __fastcall GetComputerForGUID(const GUID &GUID);

Properties

Type Visibility Source Unit Parent
function public
Datasnap.Win.ObjBrkr.pas
Datasnap.Win.ObjBrkr.hpp
Datasnap.Win.ObjBrkr TSimpleObjectBroker

Description

Returns a string that identifies an available server machine.

Call GetComputerForGUID to obtain the name of an available server machine. The GUID parameter (which specifies the global unique identifier of the desired server interface) is ignored.

GetComputerForGUID returns the ComputerName property of an available server from the Servers property. If the LoadBalanced property is true, this server is chosen at random from available servers. If the LoadBalanced property is false, this server is the first available server listed in the Servers property. If no servers are available, GetComputerForGUID raises an EBrokerException exception.

A server is considered available if its Enabled property is true and its HasFailed property is false. The broker automatically sets HasFailed to false when it is notified of a connection failure for that server.

See Also