|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.admin.ClassLoaderProvider
public final class ClassLoaderProvider
Manages the class loader which should be used for loading configuration definition classes and associated extensions.
For extensions which define their own extended configuration definitions, the class loader will make sure that the configuration definition classes are loaded and initialized.
Initially the class loader provider is disabled, and calls to the
getClassLoader()
will return the system default class
loader.
Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
Method Summary | |
---|---|
void |
addExtension(java.lang.String... extensions)
Add the named extensions to this class loader provider. |
void |
disable()
Disable this class loader provider and removed any registered extensions. |
void |
enable()
Enable this class loader provider using the application's class loader as the parent class loader. |
void |
enable(java.lang.ClassLoader parent)
Enable this class loader provider using the provided parent class loader. |
java.lang.ClassLoader |
getClassLoader()
Gets the class loader which should be used for loading classes and resources. |
static ClassLoaderProvider |
getInstance()
Get the single application wide class loader provider instance. |
boolean |
isEnabled()
Indicates whether this class loader provider is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ClassLoaderProvider getInstance()
public void addExtension(java.lang.String... extensions) throws InitializationException, java.lang.IllegalStateException, java.lang.IllegalArgumentException
extensions
- The names of the extensions to be loaded. The names
should not contain any path elements and must be located
within the extensions folder.
InitializationException
- If one of the extensions could not be loaded and
initialized.
java.lang.IllegalStateException
- If this class loader provider is disabled.
java.lang.IllegalArgumentException
- If one of the extension names was not a single relative
path name element or was an absolute path.public void disable() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- If this class loader provider is already disabled.public void enable() throws InitializationException, java.lang.IllegalStateException
InitializationException
- If the class loader provider could not initialize
successfully.
java.lang.IllegalStateException
- If this class loader provider is already enabled.public void enable(java.lang.ClassLoader parent) throws InitializationException, java.lang.IllegalStateException
parent
- The parent class loader.
InitializationException
- If the class loader provider could not initialize
successfully.
java.lang.IllegalStateException
- If this class loader provider is already enabled.public java.lang.ClassLoader getClassLoader()
Applications MUST NOT maintain persistent references to the class loader as it can change at run-time.
public boolean isEnabled()
true
if this class loader provider
is enabled.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |