站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

LifecycleManager (NetBeans Utilities API) - NetBeans API Javadoc 5.0.0

 

org.openide
Class LifecycleManager

java.lang.Object
  extended byorg.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).


 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.