Class IsolatedConnectorClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.odpi.openmetadata.frameworks.connectors.IsolatedConnectorClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
IsolatedConnectorClassLoader is used by a connector provider to create a connector instance that uses class
implementations from its own JAR file rather than any class implementations that may have already been loaded.
-
Constructor Summary
ModifierConstructorDescriptionIsolatedConnectorClassLoader
(String jarFileName) protected
IsolatedConnectorClassLoader
(String jarFileName, ClassLoader jdkClassLoader, ClassLoader defaultClassLoader) Creates a new class loader of the specified name and using the specified parent class loader for delegation. -
Method Summary
Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Constructor Details
-
IsolatedConnectorClassLoader
- Throws:
IOException
-
IsolatedConnectorClassLoader
protected IsolatedConnectorClassLoader(String jarFileName, ClassLoader jdkClassLoader, ClassLoader defaultClassLoader) throws IOException Creates a new class loader of the specified name and using the specified parent class loader for delegation.- Parameters:
jarFileName
- name of the jar file to load fromjdkClassLoader
- the parent class loader for JRE classesdefaultClassLoader
- the class loader to use if can not find class in JAR.- Throws:
IOException
-
-
Method Details
-
loadClass
This loads classes from the JDK, then the JAR file, then the default class loader.- Overrides:
loadClass
in classClassLoader
- Parameters:
name
- The binary name of the class- Returns:
- loaded class
- Throws:
ClassNotFoundException
- not found on the class path
-