<> <> <> <> <<>> DIRECTORY ComputeServerClient, IO, Rope; ComputeServerClientStubImpl: CEDAR MONITOR EXPORTS ComputeServerClient = BEGIN <> ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; RealStartServiceProc: ComputeServerClient.StartServiceProc _ NIL; RealBestServerStatsProc: ComputeServerClient.BestServerStatsProc _ NIL; <> BestServerStats: PUBLIC PROC RETURNS[success: ComputeServerClient.RemoteSuccess _ false, selfIsBest: BOOL_ TRUE, FOM: REAL _ 1.0] = { IF RealBestServerStatsProc = NIL THEN RETURN [false, FALSE, 0.0] ELSE { [success, selfIsBest, FOM] _ RealBestServerStatsProc[]; }; }; StartService: PUBLIC PROC [service: ROPE, version: ROPE, cmdLine: ROPE, in, out: STREAM, queueService: BOOL _ FALSE, timeToWait: INT _ 3600, retries: NAT _ 3] RETURNS [found: BOOL _ TRUE, success: ComputeServerClient.RemoteSuccess _ false, remoteMsg: ROPE _ NIL, serverInstance: ROPE _ NIL] = { IF RealStartServiceProc = NIL THEN RETURN [FALSE, false, NIL, NIL] ELSE { [found, success, remoteMsg, serverInstance] _ RealStartServiceProc[service, version, cmdLine, in, out, queueService, timeToWait, retries]; }; }; <> RegisterProcs: PUBLIC PROC [StartService: ComputeServerClient.StartServiceProc, BestServerStats: ComputeServerClient.BestServerStatsProc ] = { RealStartServiceProc _ StartService; RealBestServerStatsProc _ BestServerStats; }; <> END. <<>>