DIRECTORY AlpineEnvironment, AlpineImport USING [Handle], AlpineTransMgrRpcControl, BasicTime, RPC; AlpineImportImpl: MONITOR LOCKS s.first USING s: AlpineImport.Handle IMPORTS AlpineTransMgrRpcControl, BasicTime, RPC EXPORTS AlpineImport = BEGIN TransMgrInterfaceCallFailed: PUBLIC ENTRY PROC [ s: AlpineImport.Handle, i: AlpineTransMgrRpcControl.InterfaceRecord] = { IF s.first.local THEN ERROR; IF s.first.transMgrInterface = i THEN { s.first.mostRecentBind _ BasicTime.earliestGMT; s.first.transMgrInterface _ NIL; }; }; NewInterfaces: PUBLIC PROC [s: AlpineImport.Handle] = { IF BasicTime.Period[from: s.first.mostRecentBind, to: BasicTime.Now[]] < importRetryInterval THEN GOTO BindingFailed; BEGIN ENABLE RPC.ImportFailed => SELECT why FROM communications => GOTO BindingFailed; badType, badInstance, badVersion => ERROR; wrongVersion, unbound, stubProtocol => GOTO BindingFailed; ENDCASE => ERROR; s.first.mostRecentBind _ BasicTime.Now[]; IF s.first.transMgrInterface = NIL THEN s.first.transMgrInterface _ AlpineTransMgrRpcControl.ImportNewInterface[ interfaceName: [type: "AlpineTransMgr.alpine", instance: s.first.server]]; END --ENABLE--; EXITS BindingFailed => NULL; }; importRetryInterval: INT = 15; -- seconds -- END.--AlpineImportImpl "AlpineImportImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by MBrown on January 30, 1984 11:58:06 am PST Hauser, March 7, 1985 2:15:23 pm PST NOTES The response to RPC.ImportFailure{wrongVersion, unbound, stubProtocol} should be more intelligent than just returning NIL for the interface. But I dislike signalling out of a monitor. Makes one attempt to fill in all of the unbound interfaces in s. If s is remote and an ImportNewInterface call failed recently, then this procedure returns without calling ImportNewInterface again. Transient problem, caller will retry if necessary. These represent server bugs that should be fixed NOW. These represent server problems, but not impossible ones. Hauser, March 7, 1985 2:15:02 pm PST Nodified, added copyright. Κ/˜šœ™Icodešœ Οmœ1™<—šœ™Jšœ*™*K™$—J˜Jšœ™J˜JšœM™MJšœM™MJšœ™˜šΟk ˜ J˜Jšœ žœ ˜J˜J˜ Jšžœ˜J˜——šœžœžœ žœ˜Dšž˜J˜J˜ Jšž˜—šž˜J˜ —Jšœž˜J˜šΟnœžœžœžœ˜0J˜J˜0Jšžœžœžœ˜šžœžœ˜'J˜/Jšœžœ˜ J˜—J˜J˜—JšŸ œžœžœ˜6šœ˜Jšœ@™@JšœC™CJšœ@™@šžœZ˜\Jšžœžœ˜—š žœžœžœžœž˜0šœžœ˜%Jšœ2™2—šœ$žœ˜*Jšœ5™5—šœ'žœ˜:Jšœ9™9—Jšžœžœ˜J˜)šžœžœž˜'˜HJ˜J——JšžœΟc œ˜—šž˜Jšœžœ˜—J˜J˜—Jšœžœ  ˜,J˜Jšžœ ˜—™$K™—K™—…—τ E