115 lines
3.4 KiB
ObjectPascal
115 lines
3.4 KiB
ObjectPascal
|
|
unit LoadBalancingLibrary_Intf;
|
||
|
|
|
||
|
|
{----------------------------------------------------------------------------}
|
||
|
|
{ This unit was automatically generated by the RemObjects SDK after reading }
|
||
|
|
{ the RODL file associated with this project . }
|
||
|
|
{ }
|
||
|
|
{ Do not modify this unit manually, or your changes will be lost when this }
|
||
|
|
{ unit is regenerated the next time you compile the project. }
|
||
|
|
{----------------------------------------------------------------------------}
|
||
|
|
|
||
|
|
{$I Remobjects.inc}
|
||
|
|
|
||
|
|
interface
|
||
|
|
|
||
|
|
uses
|
||
|
|
{vcl:} Classes, TypInfo,
|
||
|
|
{RemObjects:} uROXMLIntf, uROClasses, uROClient, uROTypes, uROClientIntf;
|
||
|
|
|
||
|
|
const
|
||
|
|
{ Library ID }
|
||
|
|
LibraryUID = '{090EB224-CE46-4FEE-98CB-1DF8B2CD2CFC}';
|
||
|
|
TargetNamespace = '';
|
||
|
|
|
||
|
|
{ Service Interface ID's }
|
||
|
|
ILoadBalancingService_IID : TGUID = '{5F3AABEC-E71F-47AC-9981-9E88F1387B0D}';
|
||
|
|
|
||
|
|
{ Event ID's }
|
||
|
|
|
||
|
|
type
|
||
|
|
{ Forward declarations }
|
||
|
|
ILoadBalancingService = interface;
|
||
|
|
|
||
|
|
|
||
|
|
{ ILoadBalancingService }
|
||
|
|
ILoadBalancingService = interface
|
||
|
|
['{5F3AABEC-E71F-47AC-9981-9E88F1387B0D}']
|
||
|
|
function Sum(const A: Integer; const B: Integer): Integer;
|
||
|
|
function GetServerTime: DateTime;
|
||
|
|
end;
|
||
|
|
|
||
|
|
{ CoLoadBalancingService }
|
||
|
|
CoLoadBalancingService = class
|
||
|
|
class function Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoadBalancingService;
|
||
|
|
end;
|
||
|
|
|
||
|
|
{ TLoadBalancingService_Proxy }
|
||
|
|
TLoadBalancingService_Proxy = class(TROProxy, ILoadBalancingService)
|
||
|
|
protected
|
||
|
|
function __GetInterfaceName:string; override;
|
||
|
|
|
||
|
|
function Sum(const A: Integer; const B: Integer): Integer;
|
||
|
|
function GetServerTime: DateTime;
|
||
|
|
end;
|
||
|
|
|
||
|
|
implementation
|
||
|
|
|
||
|
|
uses
|
||
|
|
{vcl:} SysUtils,
|
||
|
|
{RemObjects:} uROEventRepository, uROSerializer, uRORes;
|
||
|
|
|
||
|
|
{ CoLoadBalancingService }
|
||
|
|
|
||
|
|
class function CoLoadBalancingService.Create(const aMessage: IROMessage; aTransportChannel: IROTransportChannel): ILoadBalancingService;
|
||
|
|
begin
|
||
|
|
result := TLoadBalancingService_Proxy.Create(aMessage, aTransportChannel);
|
||
|
|
end;
|
||
|
|
|
||
|
|
{ TLoadBalancingService_Proxy }
|
||
|
|
|
||
|
|
function TLoadBalancingService_Proxy.__GetInterfaceName:string;
|
||
|
|
begin
|
||
|
|
result := 'LoadBalancingService';
|
||
|
|
end;
|
||
|
|
|
||
|
|
function TLoadBalancingService_Proxy.Sum(const A: Integer; const B: Integer): Integer;
|
||
|
|
begin
|
||
|
|
try
|
||
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'LoadBalancingLibrary', __InterfaceName, 'Sum');
|
||
|
|
__Message.Write('A', TypeInfo(Integer), A, []);
|
||
|
|
__Message.Write('B', TypeInfo(Integer), B, []);
|
||
|
|
__Message.Finalize;
|
||
|
|
|
||
|
|
__TransportChannel.Dispatch(__Message);
|
||
|
|
|
||
|
|
__Message.Read('Result', TypeInfo(Integer), result, []);
|
||
|
|
finally
|
||
|
|
__Message.UnsetAttributes(__TransportChannel);
|
||
|
|
__Message.FreeStream;
|
||
|
|
end
|
||
|
|
end;
|
||
|
|
|
||
|
|
function TLoadBalancingService_Proxy.GetServerTime: DateTime;
|
||
|
|
begin
|
||
|
|
try
|
||
|
|
__Message.InitializeRequestMessage(__TransportChannel, 'LoadBalancingLibrary', __InterfaceName, 'GetServerTime');
|
||
|
|
__Message.Finalize;
|
||
|
|
|
||
|
|
__TransportChannel.Dispatch(__Message);
|
||
|
|
|
||
|
|
__Message.Read('Result', TypeInfo(DateTime), result, [paIsDateTime]);
|
||
|
|
finally
|
||
|
|
__Message.UnsetAttributes(__TransportChannel);
|
||
|
|
__Message.FreeStream;
|
||
|
|
end
|
||
|
|
end;
|
||
|
|
|
||
|
|
initialization
|
||
|
|
RegisterProxyClass(ILoadBalancingService_IID, TLoadBalancingService_Proxy);
|
||
|
|
|
||
|
|
|
||
|
|
finalization
|
||
|
|
UnregisterProxyClass(ILoadBalancingService_IID);
|
||
|
|
|
||
|
|
end.
|