public class Environment
extends java.lang.Object
Constructor and Description |
---|
Environment() |
Modifier and Type | Method and Description |
---|---|
static void |
addChildEnvironmentListener(EnvironmentListener listener)
Add listener.
|
static void |
addChildEnvironmentListener(EnvironmentListener listener,
java.lang.ClassLoader loader)
Add listener.
|
static void |
addChildLoaderListener(AddLoaderListener listener)
Add listener.
|
static void |
addChildLoaderListener(AddLoaderListener listener,
java.lang.ClassLoader loader)
Add listener.
|
static void |
addClassLoaderListener(ClassLoaderListener listener)
Add listener.
|
static void |
addClassLoaderListener(ClassLoaderListener listener,
java.lang.ClassLoader loader)
Add listener.
|
static void |
addCloseListener(java.lang.Object obj)
Add close listener.
|
static void |
addCloseListener(java.lang.Object obj,
java.lang.ClassLoader loader)
Add close listener.
|
static void |
addDependency(Dependency depend)
Adds a dependency to the current environment.
|
static void |
addDependency(Dependency depend,
java.lang.ClassLoader loader)
Adds a dependency to the current environment.
|
static void |
addDependency(Path path)
Adds a dependency to the current environment.
|
static void |
addDependency(Path path,
java.lang.ClassLoader loader)
Adds a dependency to the current environment.
|
static void |
addEnvironmentListener(EnvironmentListener listener)
Add listener.
|
static void |
addEnvironmentListener(EnvironmentListener listener,
java.lang.ClassLoader loader)
Add listener.
|
static void |
addPermission(java.security.Permission perm)
Adds a permission to the current environment.
|
static void |
addPermission(java.security.Permission perm,
java.lang.ClassLoader loader)
Adds a permission to the current environment.
|
static void |
addStartListener(java.lang.Object obj)
Add start listener.
|
static void |
addWeakCloseListener(java.lang.Object obj)
Add close listener.
|
static void |
addWeakCloseListener(java.lang.Object obj,
java.lang.ClassLoader loader)
Add close listener.
|
static void |
applyVisibleModules(EnvironmentApply apply)
Apply the action to visible classloaders
|
static void |
closeGlobal()
destroys the current environment.
|
static java.lang.Object |
getAttribute(java.lang.String name)
Gets a local variable for the current environment.
|
static java.lang.Object |
getAttribute(java.lang.String name,
java.lang.ClassLoader loader)
Gets a local variable for the current environment.
|
static java.lang.Throwable |
getConfigException()
Returns any configuration exception.
|
static long |
getDependencyCheckInterval()
Returns the current dependency check interval.
|
static long |
getDependencyCheckInterval(java.lang.ClassLoader loader)
Returns the current dependency check interval.
|
static DynamicClassLoader |
getDynamicClassLoader()
Returns the topmost dynamic class loader.
|
static DynamicClassLoader |
getDynamicClassLoader(java.lang.ClassLoader loader)
Returns the topmost dynamic class loader.
|
static EnvironmentClassLoader |
getEnvironmentClassLoader()
Returns the local environment.
|
static EnvironmentClassLoader |
getEnvironmentClassLoader(java.lang.ClassLoader loader)
Returns the local environment.
|
static java.lang.String |
getEnvironmentName()
Returns the environment name.
|
static java.lang.String |
getEnvironmentName(java.lang.ClassLoader loader)
Returns the environment name.
|
static java.lang.Object |
getLevelAttribute(java.lang.String name)
Gets a local variable for the current environment.
|
static java.lang.Object |
getLevelAttribute(java.lang.String name,
java.lang.ClassLoader loader)
Gets a local variable for the current environment.
|
static java.lang.String |
getLocalClassPath()
Returns the classpath for the environment level.
|
static java.lang.String |
getLocalClassPath(java.lang.ClassLoader loader)
Returns the classpath for the environment level.
|
static java.lang.Object |
getOwner()
Gets the class loader owner.
|
static java.lang.Object |
getOwner(java.lang.ClassLoader loader)
Gets the class loader owner.
|
static void |
init()
Starts the current environment.
|
static void |
init(java.lang.ClassLoader loader)
Starts the current environment.
|
static void |
initializeEnvironment()
Initializes the environment
|
static boolean |
isLoggingInitialized() |
static void |
removeEnvironmentListener(EnvironmentListener listener)
Remove listener.
|
static void |
removeEnvironmentListener(EnvironmentListener listener,
java.lang.ClassLoader loader)
Remove listener.
|
static java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets a local variable for the current environment.
|
static java.lang.Object |
setAttribute(java.lang.String name,
java.lang.Object value,
java.lang.ClassLoader loader)
Sets a local variable for the current environment.
|
static void |
setConfigException(java.lang.Throwable e)
Sets a configuration exception.
|
static void |
start()
Starts the current environment.
|
static void |
start(java.lang.ClassLoader loader)
Starts the current environment.
|
static void |
stop()
Starts the current environment.
|
static void |
stop(java.lang.ClassLoader loader)
Starts the current environment.
|
public static EnvironmentClassLoader getEnvironmentClassLoader()
public static EnvironmentClassLoader getEnvironmentClassLoader(java.lang.ClassLoader loader)
public static void addEnvironmentListener(EnvironmentListener listener)
listener
- object to listen for environment start/stoppublic static void addEnvironmentListener(EnvironmentListener listener, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void removeEnvironmentListener(EnvironmentListener listener)
listener
- object to listen for environment start/stoppublic static void removeEnvironmentListener(EnvironmentListener listener, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addChildEnvironmentListener(EnvironmentListener listener)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addChildEnvironmentListener(EnvironmentListener listener, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addChildLoaderListener(AddLoaderListener listener)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addChildLoaderListener(AddLoaderListener listener, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addClassLoaderListener(ClassLoaderListener listener)
listener
- object to listen for environment create/destroypublic static void addClassLoaderListener(ClassLoaderListener listener, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addStartListener(java.lang.Object obj)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addCloseListener(java.lang.Object obj)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addCloseListener(java.lang.Object obj, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addWeakCloseListener(java.lang.Object obj)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void addWeakCloseListener(java.lang.Object obj, java.lang.ClassLoader loader)
listener
- object to listen for environment create/destroyloader
- the context class loaderpublic static void init()
public static void init(java.lang.ClassLoader loader)
public static void start() throws StartLifecycleException
StartLifecycleException
public static void start(java.lang.ClassLoader loader) throws StartLifecycleException
StartLifecycleException
public static void stop()
public static void stop(java.lang.ClassLoader loader)
public static void addDependency(Dependency depend)
depend
- the dependency to addpublic static void addDependency(Dependency depend, java.lang.ClassLoader loader)
depend
- the dependency to addloader
- the context loaderpublic static DynamicClassLoader getDynamicClassLoader()
public static DynamicClassLoader getDynamicClassLoader(java.lang.ClassLoader loader)
loader
- the context loaderpublic static void addDependency(Path path)
depend
- the dependency to addpublic static void addDependency(Path path, java.lang.ClassLoader loader)
path
- the dependency to addloader
- the context loaderpublic static java.lang.Object getAttribute(java.lang.String name)
name
- the attribute namepublic static long getDependencyCheckInterval()
public static long getDependencyCheckInterval(java.lang.ClassLoader loader)
public static java.lang.Object getAttribute(java.lang.String name, java.lang.ClassLoader loader)
name
- the attribute nameloader
- the context loaderpublic static java.lang.Object getLevelAttribute(java.lang.String name)
name
- the attribute namepublic static java.lang.Object getLevelAttribute(java.lang.String name, java.lang.ClassLoader loader)
name
- the attribute nameloader
- the context loaderpublic static java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
name
- the attribute namevalue
- the new attribute valuepublic static java.lang.Object setAttribute(java.lang.String name, java.lang.Object value, java.lang.ClassLoader loader)
name
- the attribute namevalue
- the new attribute valueloader
- the context loaderpublic static void addPermission(java.security.Permission perm)
perm
- the permission to add.public static void addPermission(java.security.Permission perm, java.lang.ClassLoader loader)
perm
- the permission to add.public static java.lang.Object getOwner()
public static java.lang.Object getOwner(java.lang.ClassLoader loader)
public static void setConfigException(java.lang.Throwable e)
public static java.lang.Throwable getConfigException()
public static java.lang.String getEnvironmentName()
public static java.lang.String getEnvironmentName(java.lang.ClassLoader loader)
public static void applyVisibleModules(EnvironmentApply apply)
public static java.lang.String getLocalClassPath()
public static java.lang.String getLocalClassPath(java.lang.ClassLoader loader)
public static void closeGlobal()
public static boolean isLoggingInitialized()
public static void initializeEnvironment()