Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.ide.cmd
Interface ShutdownHook

All Known Implementing Classes:
BookmarkAddin, JCompiler, JLibraryManager, JspLibraryAddin, VCSExtension

public interface ShutdownHook

A shutdown hook can be used to veto the shutdown sequence of the IDE and perform necessary deregistration (for example, closing sockets) when the IDE is terminating.

A shutdown hook is registered with ExitCommand.addShutdownHook(ShutdownHook).

Since:
10.1.3

Method Summary
 boolean canShutdown()
          Called on shutdown hooks in the order they were registered prior to shutting down the IDE.
 void shutdown()
          Called on all shutdown hooks in the order they were registered when the IDE is terminating.
 

Method Detail

canShutdown

boolean canShutdown()
Called on shutdown hooks in the order they were registered prior to shutting down the IDE. If any hook returns false, the shutdown sequence will be aborted and no further hooks will be queried.

Returns:
true if shutdown can proceed, false to abort shutdown.

shutdown

void shutdown()
Called on all shutdown hooks in the order they were registered when the IDE is terminating. The IDE will quit when this method is called, therefore it is unnecessary to perform deregistration tasks that do not have an external effect. For example, it is unnecessary to deregister menu items, but it might be necessary to close a network connection or save a file.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.