public class BundleDelegatingClassLoader extends ClassLoader
ClassLoader implementation delegating to a given OSGi bundle, and to the specified ClassLoader
as a fallback.| Modifier and Type | Field and Description |
|---|---|
protected org.osgi.framework.Bundle |
bundle
The bundle which loaded Ignite.
|
protected ClassLoader |
clsLdr
The fallback classloader, expected to be the ignite-core classloader.
|
| Constructor and Description |
|---|
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)
Constructor.
|
BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader classLoader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected ClassNotFoundException |
classNotFoundException(String clsName)
Builds a
ClassNotFoundException. |
protected Class<?> |
findClass(String name) |
protected URL |
findResource(String name) |
protected Enumeration |
findResources(String name)
Finds a given resource from within the
bundle. |
org.osgi.framework.Bundle |
getBundle()
Returns the
Bundle to which this ClassLoader is associated. |
protected Class<?> |
loadClass(String name,
boolean resolve)
|
String |
toString() |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignersprotected final org.osgi.framework.Bundle bundle
@GridToStringExclude protected final ClassLoader clsLdr
public BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle)
bundle - The bundlepublic BundleDelegatingClassLoader(org.osgi.framework.Bundle bundle,
ClassLoader classLoader)
bundle - The bundle.classLoader - Fallback classloader.protected Class<?> findClass(String name) throws ClassNotFoundException
findClass in class ClassLoaderClassNotFoundExceptionprotected URL findResource(String name)
findResource in class ClassLoaderprotected Enumeration findResources(String name) throws IOException
bundle.findResources in class ClassLoadername - The resource name.IOExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoadername - Class name.resolve - true to resolve the class.ClassNotFoundExceptionpublic org.osgi.framework.Bundle getBundle()
Bundle to which this ClassLoader is associated.protected ClassNotFoundException classNotFoundException(String clsName)
ClassNotFoundException.clsName - Class name.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016