Module: environment-protocols Synopsis: Protocol-level abstract descriptions of restarts and their invocation. Author: Paul Howard (Not the owner of this library!) Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND ///// // An application-only object. // Provides an abstract handle on a restart that can be signalled on a // thread. Via this handle, a printable description of the restart can // be obtained, and the restart itself can be signalled on the thread // prepared to handle it. define sealed class () end class; // Exported operations on define open generic application-thread-restarts (server :: , thread :: ) => (sequence-of-restart-objects :: ); define open generic application-restart-message (server :: , rst :: ) => (printable-string :: ); define open generic application-restart-abort? (server :: , rst :: ) => (is-abort? :: ); define open generic invoke-application-restart (server :: , thread :: , rst :: ) => (); /// /// Methods at the project level. /// (These just dispatch to the application server, which implements them) /// define method application-thread-restarts (project :: , thread :: ) => (sequence-of-restart-objects :: ) let server = choose-server(project, thread, error?: #t); application-thread-restarts(server, thread) end method; define method application-restart-message (project :: , rst :: ) => (printable-string :: ) let server = choose-server(project, rst, error?: #t); application-restart-message(server, rst) end method; define method application-restart-abort? (project :: , rst :: ) => (is-abort? :: ) let server = choose-server(project, rst, error?: #t); application-restart-abort?(server, rst) end method; define method invoke-application-restart (project :: , thread :: , rst :: ) => () let server = choose-server(project, rst, error?: #t); invoke-application-restart(server, thread, rst) end method; define method environment-object-type-name (object :: ) => (name :: ) "Restart" end method environment-object-type-name;