com.caucho.loader
Class EnvironmentLocal<E>

java.lang.Object
  extended by com.caucho.loader.EnvironmentLocal<E>

public class EnvironmentLocal<E>
extends java.lang.Object

Creates a ClassLoader dependent variable. The value of the ClassLoaderLocal variable depends on the context ClassLoader.


Constructor Summary
EnvironmentLocal()
          Creates a new environment local variable with an anonymous identifier.
EnvironmentLocal(java.lang.String varName)
           
 
Method Summary
 E get()
          Returns the variable for the context classloader.
 E get(java.lang.ClassLoader loader)
          Returns the variable for the context classloader.
 E getGlobal()
          Returns the global value.
 E getLevel()
          Returns the variable for the context classloader.
 E getLevel(java.lang.ClassLoader loader)
          Returns the variable for the context classloader.
static java.lang.ClassLoader getSystemClassLoader()
           
 java.lang.String getVariable()
           
 E remove()
          Removes this variable
 E remove(java.lang.ClassLoader loader)
          Removes the variable for the context classloader.
 E set(E value)
          Sets the variable for the context classloader.
 E set(E value, java.lang.ClassLoader loader)
          Sets the variable for the context classloader.
 E setGlobal(E value)
          Sets the global value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvironmentLocal

public EnvironmentLocal()
Creates a new environment local variable with an anonymous identifier.


EnvironmentLocal

public EnvironmentLocal(java.lang.String varName)
Method Detail

getVariable

public java.lang.String getVariable()

get

public E get()
Returns the variable for the context classloader.


get

public E get(java.lang.ClassLoader loader)
Returns the variable for the context classloader.


getLevel

public E getLevel()
Returns the variable for the context classloader.


getLevel

public E getLevel(java.lang.ClassLoader loader)
Returns the variable for the context classloader.


set

public final E set(E value)
Sets the variable for the context classloader.

Parameters:
value - the new value
Returns:
the old value

set

public final E set(E value,
                   java.lang.ClassLoader loader)
Sets the variable for the context classloader.

Parameters:
value - the new value
Returns:
the old value

remove

public final E remove()
Removes this variable

Returns:
the old value

remove

public final E remove(java.lang.ClassLoader loader)
Removes the variable for the context classloader.

Returns:
the old value

setGlobal

public E setGlobal(E value)
Sets the global value.

Parameters:
value - the new value
Returns:
the old value

getGlobal

public E getGlobal()
Returns the global value.


getSystemClassLoader

public static java.lang.ClassLoader getSystemClassLoader()