public final class NarClassLoaders extends Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
NarClassLoaders.NarDetails |
| Modifier and Type | Field and Description |
|---|---|
private static AtomicReference<Map<String,ClassLoader>> |
extensionClassLoaders |
static String |
FRAMEWORK_NAR_ID |
private static AtomicReference<ClassLoader> |
frameworkClassLoader |
private static AtomicBoolean |
initialized |
static String |
JETTY_NAR_ID |
private static org.slf4j.Logger |
logger |
| Modifier | Constructor and Description |
|---|---|
private |
NarClassLoaders() |
| Modifier and Type | Method and Description |
|---|---|
private static ClassLoader |
createNarClassLoader(File narDirectory,
ClassLoader parentClassLoader)
Creates a new NarClassLoader.
|
static ClassLoader |
getExtensionClassLoader(File extensionWorkingDirectory) |
static Set<ClassLoader> |
getExtensionClassLoaders() |
static ClassLoader |
getFrameworkClassLoader() |
private static NarClassLoaders.NarDetails |
getNarDetails(File narDirectory)
Loads the details for the specified NAR.
|
static void |
load(NiFiProperties properties)
Loads the extensions class loaders from the specified working directory.
|
public static final String FRAMEWORK_NAR_ID
public static final String JETTY_NAR_ID
private static final org.slf4j.Logger logger
private static final AtomicBoolean initialized
private static final AtomicReference<Map<String,ClassLoader>> extensionClassLoaders
private static final AtomicReference<ClassLoader> frameworkClassLoader
public static void load(NiFiProperties properties) throws IOException, ClassNotFoundException
properties - properties object to initialize withIOException - ioeClassNotFoundException - cfneIllegalStateException - if the class loaders have already been
createdprivate static ClassLoader createNarClassLoader(File narDirectory, ClassLoader parentClassLoader) throws IOException, ClassNotFoundException
narDirectory - root directory of narparentClassLoader - parent classloader of narIOException - ioeClassNotFoundException - cfneprivate static NarClassLoaders.NarDetails getNarDetails(File narDirectory) throws IOException
narDirectory - the nar directoryIOException - ioepublic static ClassLoader getFrameworkClassLoader()
IllegalStateException - if the frame class loader has not been
loadedpublic static ClassLoader getExtensionClassLoader(File extensionWorkingDirectory)
extensionWorkingDirectory - the directoryIllegalStateException - if the class loaders have not been loadedpublic static Set<ClassLoader> getExtensionClassLoaders()
IllegalStateException - if the class loaders have not been loadedCopyright © 2016 Apache NiFi Project. All rights reserved.