Oberon || Library || Module Index || Search Engine || Definition || Module
CONST typeGuardFailure = 0; CONST notARobustObject = 1; CONST errors = 2; TYPE ErrorCode = SHORTINT; TYPE ErrorEvent = POINTER TO ErrorEventRec; TYPE ErrorEventRec = RECORD (Events.EventRec) errorcode: ErrorCode; END; VAR error: Events.EventType; VAR errormsg: ARRAY errors OF Events.Message;
PROCEDURE Export(object: Services.Object; status: Names.Status; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE ExportR(object: Services.Object; status: Names.Status; root: Names.Node; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN;
PROCEDURE Import(VAR object: Services.Object; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE ImportR(VAR object: Services.Object; root: Names.Node; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE GuardedImportR(VAR object: Services.Object; guard: Services.Type; root: Names.Node; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN; PROCEDURE GuardedImport(VAR object: Services.Object; guard: Services.Type; path: ARRAY OF CHAR; auth: Shards.Lid; errors: RelatedEvents.Object) : BOOLEAN;
This mechanism requires the support of both sides:
The paths are interpreted as described by PathConditions and taken relatively to root (if ExportR, ImportR, or GuardedImportR is used). The authorization lid auth is used to access all components of the parts and passed to PathConditions. Export and ExportR pass status (just Names.examine and Names.change are to be given if non-NIL) to the equally named parameter of Names.CreateNode. Note that all operations block until the whole path becomes accessible (see PathConditions).
The suspension and reanimation of proxy objects is signalled by Resources: Resources.communicationStopped and Resources.communicationResumed. No operations are processed while the proxy object is suspended. The proxy object terminates if the recovery mechanism fails due to fatal errors.
Note that ``robust objects'' may be freely exported and imported by using RemoteObjects directly. But they get their special property only if Import, ImportR, GuardedImport, or GuardedImportR have been called on the exporting side and Export or ExportR on the importing side.
Typing errors in path names may cause all operations to hang infinitively.
Oberon || Library || Module Index || Search Engine || Definition || Module