ComputeServerServer.mesa
Compute Server interface for the stub of the Server. This is an interface from the rest of the Cedar world to the Server. This is not an RPC interface, and is used on the Server machine.
Last Edited by: Bob Hagmann, May 15, 1985 4:40:08 pm PDT
Copyright © 1984 by Xerox Corporation. All rights reserved.
DIRECTORY
Commander,
Rope,
SymTab;
ComputeServerServer: CEDAR DEFINITIONS =
BEGIN
RegisteredProcHandle: TYPE = REF RegisteredProcObject;
RegisteredProcObject: TYPE = RECORD [
version: Rope.ROPE,
service: Rope.ROPE,
commanderProcHandle: Commander.CommandProcHandle ← NIL
];
Register: PROC [key: Rope.ROPE, version: Rope.ROPENIL, proc: Commander.CommandProc, doc: Rope.ROPENIL, clientData: REF ANYNIL];
A bcd file when it is run must call Register to register the existence of a command. The commands registered must include all commands in the .remoteCommands file for the package.
EnumerateAction: TYPE = PROC [key: Rope.ROPE, procData: LIST OF RegisteredProcHandle] RETURNS [stop: BOOLFALSE];
Enumerate: PROC [EnumerateAction] RETURNS [key: Rope.ROPE, procData: LIST OF RegisteredProcHandle];
... calls the EnumerateAction with the key and registered procedure data for all registered commands. It will stop early if the EnumerateAction returns TRUE. Commands are not enumerated in any particular order.
Lookup: PROC [key: Rope.ROPE, version: Rope.ROPE] RETURNS [procData: RegisteredProcHandle];
... will look up the command and return the associated CommandProcHandle (NIL if no such command is registered). Case of keys does not matter.
Registration - for internal Compute Server Use
RegisterRealRegistration: PRIVATE PROC [Register: PROC [key: Rope.ROPE, version: Rope.ROPENIL, proc: Commander.CommandProc, doc: Rope.ROPENIL, clientData: REF ANYNIL]];
Registry: PRIVATE SymTab.Ref; -- registered commands, for software that has been run and did a ComputeServer.Register, are saved here
END.
Bob Hagmann May 3, 1985 12:49:19 pm PDT
changes to: ComputeServerControl