public abstract class LifecycleManager extends Object
Modifier | Constructor and Description |
---|---|
protected |
LifecycleManager()
Subclass constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
exit()
Exit NetBeans.
|
void |
exit(int status)
Exit NetBeans with the given exit code.
|
static LifecycleManager |
getDefault()
Get the default lifecycle manager.
|
void |
markForRestart()
Request that the application restart immediately after next being shut down.
|
abstract void |
saveAll()
Save all opened objects.
|
public static LifecycleManager getDefault()
Lookup.getDefault()
but if no instance is
found there, a fallback instance is returned which behaves as follows:
LifecycleManager.saveAll()
does nothing
LifecycleManager.exit()
calls System.exit(int)
with an exit code of 0
public abstract void saveAll()
public abstract void exit()
System.exit(int)
fails, or if at least one component of the
system refuses to exit (because it cannot be properly shut down).public void exit(int status)
System.exit(int)
fails, or if at least one component of the
system refuses to exit (because it cannot be properly shut down). The
default implementation calls LifecycleManager.exit()
for compatibility reasons,
but subclasses are encouraged to provide better implementation.status
- the exit code of the applicationpublic void markForRestart() throws UnsupportedOperationException
LifecycleManager.exit()
to go ahead and restart now.UnsupportedOperationException
- if this request cannot be honored