toolbox.app
Class AppCache

Package class diagram package AppCache
java.lang.Object
  extended by toolbox.app.AppCache

public final class AppCache
extends java.lang.Object

Static class to cache all application environments for a specific JVM.


Method Summary
static void addEnv(java.lang.String name, AppEnv env)
          Add an environment instance to the cache.
static AppEnv getEnv(java.lang.String name)
          Returns an AppEnv instance associated with the given name from this cache.
static AppEnv removeEnv(java.lang.String name)
          Returns an AppEnv instance associated with the given name from this cache and remove it from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addEnv

public static void addEnv(java.lang.String name,
                          AppEnv env)
Add an environment instance to the cache.

Parameters:
name - Name of application environment.
env - AppEnv instance.

getEnv

public static AppEnv getEnv(java.lang.String name)
Returns an AppEnv instance associated with the given name from this cache.

Parameters:
name - Application environment name.
Returns:
AppEnv instance or null if it is not stored in the cache.

removeEnv

public static AppEnv removeEnv(java.lang.String name)
Returns an AppEnv instance associated with the given name from this cache and remove it from the cache.

Parameters:
name - Application environment name.
Returns:
AppEnv instance or null if it is not stored in the cache.