public class InstanceClassLoader extends AbstractNativeLibHandlingClassLoader
| Modifier and Type | Field and Description |
|---|---|
private Set<URL> |
additionalResourceUrls |
private String |
identifier |
private String |
instanceType |
private Set<URL> |
instanceUrls |
private static org.slf4j.Logger |
logger |
nativeLibDirList, nativeLibNameToPath| Constructor and Description |
|---|
InstanceClassLoader(String identifier,
String type,
Set<URL> instanceUrls,
Set<URL> additionalResourceUrls,
ClassLoader parent) |
InstanceClassLoader(String identifier,
String type,
Set<URL> instanceUrls,
Set<URL> additionalResourceUrls,
Set<File> narNativeLibDirs,
ClassLoader parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
private static URL[] |
combineURLs(Set<URL> instanceUrls,
Set<URL> additionalResourceUrls) |
private URL |
findResource(Set<URL> urls,
String name) |
URL |
findResource(String name)
Note: Normally URLClassLoader will only load resources that are inside JARs, or in directories, but many times we allow
properties to specify specific files to add to the classpath.
|
Set<URL> |
getAdditionalResourceUrls() |
String |
getIdentifier() |
String |
getInstanceType() |
Set<URL> |
getInstanceUrls() |
private static List<File> |
initNativeLibDirList(Set<File> narNativeLibDirs,
Set<URL> additionalResourceUrls) |
createTempCopy, findLibrary, findLibrary, getJavaLibraryPath, getUsrLibDirs, toDiraddURL, definePackage, findClass, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisOsLinuxUnix, isOsMac, isOsWindowsprivate static final org.slf4j.Logger logger
private final String identifier
private final String instanceType
public InstanceClassLoader(String identifier, String type, Set<URL> instanceUrls, Set<URL> additionalResourceUrls, ClassLoader parent)
identifier - the id of the component this ClassLoader was created forinstanceUrls - the urls for the instance, will either be empty or a copy of the NARs urlsadditionalResourceUrls - the urls that came from runtime properties of the componentparent - the parent ClassLoaderpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class URLClassLoaderIOExceptionpublic URL findResource(String name)
findResource in class URLClassLoaderprivate static List<File> initNativeLibDirList(Set<File> narNativeLibDirs, Set<URL> additionalResourceUrls)
private static URL[] combineURLs(Set<URL> instanceUrls, Set<URL> additionalResourceUrls)
public String getIdentifier()
public String getInstanceType()
Copyright © 2023 Apache NiFi Project. All rights reserved.