|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.controller.Command oracle.ide.cmd.ExitCommand
@ThreadSafe public class ExitCommand
The ExitCommand
class implements the ide exit command.
Command
Field Summary | |
---|---|
static java.lang.String |
SILENT_SAVE_ALL
Context flag, the command will not popup additional dialogs while saving files if set |
static java.lang.String |
SKIP_SAVE_ALL
Context flag, the command will skip saving all files if set |
Fields inherited from class oracle.ide.controller.Command |
---|
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type |
Constructor Summary | |
---|---|
ExitCommand()
Constructor. |
Method Summary | |
---|---|
static void |
addExecutorService(java.util.concurrent.ExecutorService executor,
java.lang.String name)
Registers an ExecutorService for shutdown when the IDE exits. |
static void |
addExecutorService(java.util.concurrent.ExecutorService executor,
java.lang.String name,
boolean immediate)
Registers an ExecutorService for shutdown when the IDE exits. |
static void |
addShutdownHook(ShutdownHook hook)
Add a shutdown hook. |
int |
doit()
Executes the system exit action. |
static void |
removeExecutorService(java.util.concurrent.ExecutorService executor)
Unregisters an ExecutorService. |
static void |
removeShutdownHook(ShutdownHook hook)
Remove a shutdown hook. |
Methods inherited from class oracle.ide.controller.Command |
---|
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData, undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SKIP_SAVE_ALL
public static final java.lang.String SILENT_SAVE_ALL
Constructor Detail |
---|
public ExitCommand()
Method Detail |
---|
public static void addShutdownHook(ShutdownHook hook)
hook
- a shutdown hook.public static void removeShutdownHook(ShutdownHook hook)
hook
- the shutdown hook to remove.public static void addExecutorService(java.util.concurrent.ExecutorService executor, java.lang.String name)
executor
- the ExecutorService to be shut downname
- the name of this ExecutorService
java.lang.NullPointerException
- if the executor or name are nullpublic static void addExecutorService(java.util.concurrent.ExecutorService executor, java.lang.String name, boolean immediate)
The caller can specify whether to immediately interupt running tasks or to perform an orderly shutdown, where running tasks are allowed to complete.
Note that an orderly shutdown can delay the shutdown of the IDE, and should only be used for executors running critical tasks that cannot be cancelled.
executor
- the ExecutorService to be shut downname
- the name of this ExecutorServiceimmediate
- true to immediately interrupt any running tasks
on shutdown, false to perform an orderly
shutdown
java.lang.NullPointerException
- if the executor or name are nullpublic static void removeExecutorService(java.util.concurrent.ExecutorService executor)
executor
- the ExecutorServicepublic int doit() throws java.lang.Exception
doit
in class Command
java.lang.Exception
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |