CourierBinding.mesa
Copyright (C) 1985, 1986 by Xerox Corporation. All rights reserved.
kam 12-Nov-85 17:33:10
Bill Jackson (bj) June 23, 1986 1:22:07 am PDT
DIRECTORY
CrRPC USING [Handle, PutArgsProc],
CourierBindingProtocol USING [Address, Range];
CourierBinding: CEDAR DEFINITIONS ~ {
Client interaction
A client calls Bind to find a network element that exports a program
that is in the version range. If the service has registered a binding
predicate, the client passes the parameters via user.
Server interaction
A service can register a predicate that is called whenever a request
for binding is made. This predicate is called with the client-supplied
parameters, allowing the service to decide if it should be bound to.
If no predicate has been registered, or the client did not supply
parameters, then it is treated as if the predicate returned TRUE.
Copied Types
Address: TYPE ~ CourierBindingProtocol.Address;
Handle: TYPE ~ CrRPC.Handle;
PutArgsProc: TYPE ~ CrRPC.PutArgsProc;
Range: TYPE ~ CourierBindingProtocol.Range;
Interesting Types
Predicate: TYPE = PROC [h: Handle, program: CARD, range: Range, clientData: REF] RETURNS [respond: BOOLEAN];
Registration: TYPE ~ REF RegistrationObject;
Private Object !!!
RegistrationObject: TYPE = RECORD [
clientData: REF,
predicate: Predicate,
program: CARD,
range: Range
];
Procs
Bind: PUBLIC PROC [predicate: CARD, versions: Range, maxHops: CARDINAL, stubPutPred: PutArgsProc] RETURNS [answer: Address];
Register: PROC [program: CARD, range: Range, predicate: Predicate, clientData: REF] RETURNS [r: Registration];
Unregister: PROC [r: Registration];
}...