Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.util 6.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openide
Class LifecycleManager

    java.lang.Object
      org.openide.LifecycleManager

    public abstract class LifecycleManager

extends Object

Manages major aspects of the NetBeans lifecycle - currently saving all objects and exiting.

Since:
  3.14

Constructor Summary
`protected` | `LifecycleManager()` Subclass constructor.

Method Summary
`abstract void` | `exit()` Exit NetBeans.
`static LifecycleManager` | `getDefault()` Get the default lifecycle manager.
`abstract void` | `saveAll()` Save all opened objects.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### LifecycleManager

    protected LifecycleManager()

  Subclass constructor.

Method Detail

### getDefault

    public static LifecycleManager getDefault()

  Get the default lifecycle manager. Normally this is found in `Lookup.getDefault()` but if no instance is found there, a fallback instance is returned which behaves as follows:
  1. `saveAll()` does nothing
  2. `exit()` calls `System.exit(int)` with an exit code of 0
  This is useful for unit tests and perhaps standalone library usage.

  Returns:
    the default instance (never null)

### saveAll

    public abstract void saveAll()

  Save all opened objects.

### exit

    public abstract void exit()

  Exit NetBeans. This method will return only if `System.exit(int)` fails, or if at least one component of the system refuses to exit (because it cannot be properly shut down).

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.util 6.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.