Class CustomClassLoader
java.lang.Object
java.lang.ClassLoader
com.infoteria.asteria.flowengine2.storage.CustomClassLoader
- Direct Known Subclasses:
ComponentClassLoader
To parse custom classloader details from a XML definition, this is an example for a basic configuration:
If the classloader properties should be configurable by the user in the Flow Designer, properties with the following names can be added to the classloader configuration:
The following lists describe all available attributes and elements of the classloader configuration.
<ClassLoader jarDir="{pathToLibraries}">
- "Jarfile": a single jar file to add
- "JarfilesDir": a directory containing jar files
<ClassLoader jarDir="{pathToLibraries}">
<Property initialState="collapse" name="ClassloaderDetails" type="group" unfold="true">
<Property name="Jarfile" type="remoteFile"/>
<Property name="JarfilesDir" type="remoteFile"/>
</Property>
</ClassLoader>
List of attributes:
- classLoaderClass: The custom classloader implementation class. Default: com.infoteria.asteria.flowengine2.flow.ComponentClassLoader.
- jarDir: Directory containing libraries to load. Either absolute path or relative to [data_dir]/system/lib/separated.
- classesdir: Directory containing class files to load. Either absolute path or relative to [data_dir]/system/lib/separated.
List of elements:
- Jar: A jar file to load. Add path to jar file as attribute "path". Either absolute path or relative to [data_dir]/system/lib/separated.
- ExcludePkg: Packages, that will not be loaded by this classloader, even when contained in the specified resources. By default, the ComponentClassLoader adds the following packages as excluded packages: com.infoteria.asteria, java, jdk, sun, com.sun, oracle
- IncludePkg: Packages, that will be loaded by this classloader, even when its parent package is contained in the excluded list.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddJarFile(String jarFilePath) abstract voidaddJarFilesDirectory(String directoryPath) protected abstract voidprotected abstract CustomClassLoaderclone()protected booleanprotected abstract voidinit(List<String> jarFiles, String jarFilesDirectory, String classesDirectory, String entryClass, List<String> excludedPackages, List<String> includedPackages) protected static CustomClassLoaderparseClassloader(Element el, String entryClassName) Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Field Details
-
E_CLASSLOADER
- See Also:
-
PROP_JARFILE_NAME
- See Also:
-
PROP_JARFILESDIR_NAME
- See Also:
-
-
Constructor Details
-
CustomClassLoader
-
-
Method Details
-
init
-
clone
-
assignTo
-
hasVisibleProperties
protected boolean hasVisibleProperties() -
addJarFile
-
addJarFilesDirectory
-
parseClassloader
protected static CustomClassLoader parseClassloader(Element el, String entryClassName) throws ClassNotFoundException, NoClassDefFoundError, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException, SecurityException, IllegalArgumentException -
createJarfileProperty
-
createJarfilesDirProperty
-