org.netbeans.core.startup/1 1.40

org.netbeans.core.startup.layers
Class SessionManager

java.lang.Object
  extended by org.netbeans.core.startup.layers.SessionManager

public final class SessionManager
extends Object

Session manager.


Field Summary
static String LAYER_INSTALL
          instalation layer
static String LAYER_SESSION
          session layer
static String PROP_CLOSE
          session is closed
static String PROP_OPEN
          session is opened
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Registers PropertyChangeListener to receive events.
 void close()
          Close session
 FileSystem create(File userDir, File homeDir, File[] extradirs)
          Initializes and creates new repository.
static SessionManager getDefault()
          get default one
 FileSystem getLayer(String name)
          get a layer associated with the name
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes PropertyChangeListener from the list of listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_OPEN

public static final String PROP_OPEN
session is opened

See Also:
Constant Field Values

PROP_CLOSE

public static final String PROP_CLOSE
session is closed

See Also:
Constant Field Values

LAYER_SESSION

public static final String LAYER_SESSION
session layer

See Also:
Constant Field Values

LAYER_INSTALL

public static final String LAYER_INSTALL
instalation layer

See Also:
Constant Field Values
Method Detail

getDefault

public static SessionManager getDefault()
get default one


create

public FileSystem create(File userDir,
                         File homeDir,
                         File[] extradirs)
                  throws PropertyVetoException,
                         IOException
Initializes and creates new repository. This repository's system fs is based on the content of ${HOME_DIR}/system and ${USER_DIR}/system directories

Parameters:
userDir - directory where user can write
homeDir - directory where netbeans has been installed, user need not have write access
extradirs - 0+ extra dirs to add; cf. #27151
Returns:
repository
Throws:
PropertyVetoException - if something fails
IOException

close

public void close()
Close session


getLayer

public FileSystem getLayer(String name)
get a layer associated with the name

Parameters:
name - layer name (LAYER_SESSION, ...)
Returns:
layer, can be null

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Registers PropertyChangeListener to receive events.

Parameters:
listener - The listener to register.

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
Removes PropertyChangeListener from the list of listeners.

Parameters:
listener - The listener to remove.

org.netbeans.core.startup/1 1.40

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.