public interface ExtensionManager
| Modifier and Type | Method and Description |
|---|---|
void |
closeURLClassLoader(String instanceIdentifier,
ClassLoader classLoader)
Closes the given ClassLoader if it is an instance of URLClassLoader.
|
default InstanceClassLoader |
createInstanceClassLoader(String classType,
String instanceIdentifier,
Bundle bundle,
Set<URL> additionalUrls)
Creates the ClassLoader for the instance of the given type.
|
InstanceClassLoader |
createInstanceClassLoader(String classType,
String instanceIdentifier,
Bundle bundle,
Set<URL> additionalUrls,
boolean registerClassLoader,
String classloaderIsolationKey)
Creates the ClassLoader for the instance of the given type.
|
Set<Bundle> |
getAllBundles()
Retrieves all bundles known to this ExtensionManager.
|
Bundle |
getBundle(BundleCoordinate bundleCoordinate)
Retrieves the bundle with the given coordinate.
|
Bundle |
getBundle(ClassLoader classLoader)
Retrieves the bundle for the given class loader.
|
List<Bundle> |
getBundles(String classType)
Retrieves the bundles that have a class with the given name.
|
Class<?> |
getClass(ExtensionDefinition extensionDefinition)
Returns the Class that is described by the given definition
|
Set<ExtensionDefinition> |
getExtensions(Class<?> definition)
Retrieves the set of classes that have been loaded for the definition.
|
InstanceClassLoader |
getInstanceClassLoader(String instanceIdentifier)
Retrieves the InstanceClassLoader for the component with the given identifier.
|
ConfigurableComponent |
getTempComponent(String classType,
BundleCoordinate bundleCoordinate)
Gets the temp component with the given type from the given bundle.
|
Set<ExtensionDefinition> |
getTypes(BundleCoordinate bundleCoordinate)
Retrieves the extension classes that were loaded from the bundle with the given coordinate.
|
void |
logClassLoaderDetails()
Logs details about the files loaded by the class loaders
|
void |
logClassLoaderMapping()
Logs the available class loaders.
|
void |
registerInstanceClassLoader(String instanceIdentifier,
InstanceClassLoader instanceClassLoader)
Registers the given instance class loader so that it can be later retrieved via
getInstanceClassLoader(String) |
InstanceClassLoader |
removeInstanceClassLoader(String instanceIdentifier)
Removes the InstanceClassLoader for a given component.
|
Set<Bundle> getAllBundles()
default InstanceClassLoader createInstanceClassLoader(String classType, String instanceIdentifier, Bundle bundle, Set<URL> additionalUrls)
classType - the type of class to create the ClassLoader forinstanceIdentifier - the identifier of the specific instance of the classType to look up the ClassLoader forbundle - the bundle where the classType existsadditionalUrls - additional URLs to add to the instance class loaderInstanceClassLoader createInstanceClassLoader(String classType, String instanceIdentifier, Bundle bundle, Set<URL> additionalUrls, boolean registerClassLoader, String classloaderIsolationKey)
classType - the type of class to create the ClassLoader forinstanceIdentifier - the identifier of the specific instance of the classType to look up the ClassLoader forbundle - the bundle where the classType existsadditionalUrls - additional URLs to add to the instance class loaderregisterClassLoader - whether or not to register the class loader as the new classloader for the component with the given IDclassloaderIsolationKey - a classloader key that can be used in order to specify which shared class loader can be used as the instance class loader's parent, or null if the
parent class loader should be shared or if cloning ancestors is not necessaryInstanceClassLoader getInstanceClassLoader(String instanceIdentifier)
instanceIdentifier - the identifier of a componentInstanceClassLoader removeInstanceClassLoader(String instanceIdentifier)
instanceIdentifier - the of a componentvoid registerInstanceClassLoader(String instanceIdentifier, InstanceClassLoader instanceClassLoader)
getInstanceClassLoader(String)instanceIdentifier - the instance identifierinstanceClassLoader - the class loadervoid closeURLClassLoader(String instanceIdentifier, ClassLoader classLoader)
instanceIdentifier - the instance id the class loader corresponds toclassLoader - the class loader to closeList<Bundle> getBundles(String classType)
classType - the class name of an extensionBundle getBundle(BundleCoordinate bundleCoordinate)
bundleCoordinate - a coordinate to look upSet<ExtensionDefinition> getTypes(BundleCoordinate bundleCoordinate)
bundleCoordinate - the coordinateClass<?> getClass(ExtensionDefinition extensionDefinition)
extensionDefinition - the extension definitionBundle getBundle(ClassLoader classLoader)
classLoader - the class loader to look up the bundle forSet<ExtensionDefinition> getExtensions(Class<?> definition)
definition - the extension definition, such as Processor.classConfigurableComponent getTempComponent(String classType, BundleCoordinate bundleCoordinate)
classType - the class namebundleCoordinate - the coordinatevoid logClassLoaderMapping()
void logClassLoaderDetails()
Copyright © 2023 Apache NiFi Project. All rights reserved.