public class NarThreadContextClassLoader extends URLClassLoader
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
NarThreadContextClassLoader.ContextSecurityManager |
private static class |
NarThreadContextClassLoader.SingletonHolder |
| Modifier and Type | Field and Description |
|---|---|
(package private) static NarThreadContextClassLoader.ContextSecurityManager |
contextSecurityManager |
private ClassLoader |
forward |
private static List<Class<?>> |
narSpecificClasses |
| Modifier | Constructor and Description |
|---|---|
private |
NarThreadContextClassLoader() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAssertionStatus() |
private static ClassLoader |
createClassLoader(String implementationClassName,
String instanceId,
Bundle bundle,
ExtensionManager extensionManager) |
static <T> T |
createInstance(ExtensionManager extensionManager,
String implementationClassName,
Class<T> typeDefinition,
NiFiProperties nifiProperties)
Constructs an instance of the given type using either default no args
constructor or a constructor which takes a NiFiProperties object
(preferred).
|
static <T> T |
createInstance(ExtensionManager extensionManager,
String implementationClassName,
Class<T> typeDefinition,
NiFiProperties nifiProperties,
String instanceId)
Constructs an instance of the given type using either default no args
constructor or a constructor which takes a NiFiProperties object
(preferred).
|
private Class<?> |
findNarClass(Class<?> cls) |
static NarThreadContextClassLoader |
getInstance() |
URL |
getResource(String name) |
InputStream |
getResourceAsStream(String name) |
Enumeration<URL> |
getResources(String name) |
Class<?> |
loadClass(String name) |
private ClassLoader |
lookupClassLoader() |
void |
setClassAssertionStatus(String className,
boolean enabled) |
void |
setDefaultAssertionStatus(boolean enabled) |
void |
setPackageAssertionStatus(String packageName,
boolean enabled) |
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstancedefineClass, defineClassdefineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setSignersstatic final NarThreadContextClassLoader.ContextSecurityManager contextSecurityManager
private final ClassLoader forward
public void clearAssertionStatus()
clearAssertionStatus in class ClassLoaderpublic URL getResource(String name)
getResource in class ClassLoaderpublic InputStream getResourceAsStream(String name)
getResourceAsStream in class URLClassLoaderpublic Enumeration<URL> getResources(String name) throws IOException
getResources in class ClassLoaderIOExceptionpublic Class<?> loadClass(String name) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionpublic void setClassAssertionStatus(String className, boolean enabled)
setClassAssertionStatus in class ClassLoaderpublic void setDefaultAssertionStatus(boolean enabled)
setDefaultAssertionStatus in class ClassLoaderpublic void setPackageAssertionStatus(String packageName, boolean enabled)
setPackageAssertionStatus in class ClassLoaderprivate ClassLoader lookupClassLoader()
public static NarThreadContextClassLoader getInstance()
public static <T> T createInstance(ExtensionManager extensionManager, String implementationClassName, Class<T> typeDefinition, NiFiProperties nifiProperties) throws InstantiationException, IllegalAccessException, ClassNotFoundException
T - the type to create an instance forimplementationClassName - the implementation class nametypeDefinition - the type definitionnifiProperties - the NiFiProperties instanceInstantiationException - if there is an error instantiating the classIllegalAccessException - if there is an error accessing the typeClassNotFoundException - if the class cannot be foundpublic static <T> T createInstance(ExtensionManager extensionManager, String implementationClassName, Class<T> typeDefinition, NiFiProperties nifiProperties, String instanceId) throws InstantiationException, IllegalAccessException, ClassNotFoundException
T - the type to create an instance forimplementationClassName - the implementation class nametypeDefinition - the type definitionnifiProperties - the NiFiProperties instanceinstanceId - the UUID of the instanceInstantiationException - if there is an error instantiating the classIllegalAccessException - if there is an error accessing the typeClassNotFoundException - if the class cannot be foundprivate static ClassLoader createClassLoader(String implementationClassName, String instanceId, Bundle bundle, ExtensionManager extensionManager) throws ClassNotFoundException
ClassNotFoundExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.