|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.classloader.spi.base.BaseClassLoaderDomain
org.jboss.classloader.spi.ClassLoaderDomain
public class ClassLoaderDomain
ClassLoaderDomain.
| Constructor Summary | |
|---|---|
ClassLoaderDomain(String name)
Create a new ClassLoaderDomain with the ParentPolicy.BEFORE loading rules. |
|
| Method Summary | |
|---|---|
protected Package |
afterGetPackage(String name)
Invoked after getPackage is attempted to allow a postload attempt, e.g. |
protected void |
afterGetPackages(Set<Package> packages)
Invoked after getPackages is attempted to allow a postload attempt, e.g. |
protected URL |
afterGetResource(String name)
Invoked after getResource is attempted to allow a postload attempt, e.g. |
protected void |
afterGetResources(String name,
Set<URL> urls)
Invoked after getResources is attempted to allow a postload attempt, e.g. |
protected void |
afterRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked after adding a classloader policy |
protected Package |
beforeGetPackage(String name)
Invoked before getPackage is attempted to allow a preload attempt, e.g. |
protected void |
beforeGetPackages(Set<Package> packages)
Invoked before getPackages is attempted to allow a preload attempt, e.g. |
protected URL |
beforeGetResource(String name)
Invoked before getResource is attempted to allow a preload attempt, e.g. |
protected void |
beforeGetResources(String name,
Set<URL> urls)
Invoked before getResources is attempted to allow a preload attempt, e.g. |
protected void |
beforeUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked before adding a classloader policy |
protected Loader |
findAfterLoader(String name)
Invoked after classloading is attempted to allow a postload attempt, e.g. |
protected Loader |
findBeforeLoader(String name)
Invoked before classloading is attempted to allow a preload attempt, e.g. |
ObjectName |
findClassLoaderForClass(String name)
Find the classloader for a class |
protected Loader |
findLoaderFromParent(String name)
Try to find a loader from the parent |
String |
getName()
Get the name. |
ObjectName |
getObjectName()
Get the object name |
protected Package |
getPackageFromParent(String name)
Try to get a package from the parent |
protected void |
getPackagesFromParent(Set<Package> packages,
ClassFilter filter)
Try to get packages from the parent |
Loader |
getParent()
Get the parent |
ObjectName |
getParentDomain()
Get the parent |
String |
getParentDomainName()
Get the parent |
ParentPolicy |
getParentPolicy()
Get the parent policy |
String |
getParentPolicyName()
Get the parent policy name |
protected URL |
getResourceFromParent(String name)
Try to get a resource from the parent |
protected void |
getResourcesFromParent(String name,
Set<URL> urls)
Try to get resources from the parent |
ObjectName |
getSystem()
Get the classloader system |
boolean |
isUseLoadClassForParent()
Get the useLoadClassForParent. |
List<ObjectName> |
listClassLoaders()
Get the classloaders |
Map<String,List<ObjectName>> |
listExportingClassLoaders()
Get the exporting classloaders |
List<ObjectName> |
listExportingClassLoaders(String packageName)
Get the classloaders export a package |
protected Class<?> |
loadClassAfter(String name)
Invoked after classloading is attempted to allow a postload attempt, e.g. |
protected Class<?> |
loadClassBefore(String name)
Invoked before classloading is attempted to allow a preload attempt, e.g. |
protected Class<?> |
loadClassFromParent(String name)
Try to find a load a from the parent |
Set<URL> |
loadResources(String name)
Get resources |
void |
postDeregister()
|
void |
postRegister(Boolean registrationDone)
|
void |
preDeregister()
|
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
|
protected void |
registerClassLoaderMBean(ClassLoader cl)
Register a classloader with the MBeanServer |
void |
setParent(Loader parent)
Set the parent. |
void |
setParentPolicy(ParentPolicy parentPolicy)
Set the parentPolicy. |
void |
setUseLoadClassForParent(boolean useLoadClassForParent)
Set the useLoadClassForParent. |
protected void |
toLongString(StringBuilder builder)
For subclasses to add information for toLongString() |
String |
toString()
|
protected void |
unregisterClassLoaderMBean(ClassLoader cl)
Unregister a classloader from the MBeanServer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.classloader.spi.Loader |
|---|
getPackage, getPackages, getResource, getResources, loadClass |
| Methods inherited from interface org.jboss.classloader.spi.ClassLoaderDomainMBean |
|---|
flushCaches, getClassBlackListSize, getClassCacheSize, getResourceBlackListSize, getResourceCacheSize, listClassBlackList, listClassCache, listResourceBlackList, listResourceCache, loadClass |
| Constructor Detail |
|---|
public ClassLoaderDomain(String name)
ParentPolicy.BEFORE loading rules.
name - the name of the domain
IllegalArgumentException - for a null name| Method Detail |
|---|
public String getName()
getName in interface ClassLoaderDomainMBeanpublic ObjectName getObjectName()
public ParentPolicy getParentPolicy()
public void setParentPolicy(ParentPolicy parentPolicy)
parentPolicy - the parentPolicy.
IllegalArgumentException - for a null parent policypublic String getParentPolicyName()
ClassLoaderDomainMBean
getParentPolicyName in interface ClassLoaderDomainMBeanpublic Loader getParent()
public void setParent(Loader parent)
parent - the parent.public boolean isUseLoadClassForParent()
isUseLoadClassForParent in class BaseClassLoaderDomainpublic void setUseLoadClassForParent(boolean useLoadClassForParent)
useLoadClassForParent - the useLoadClassForParent.public ObjectName getParentDomain()
ClassLoaderDomainMBean
getParentDomain in interface ClassLoaderDomainMBeanpublic String getParentDomainName()
ClassLoaderDomainMBean
getParentDomainName in interface ClassLoaderDomainMBeanpublic ObjectName getSystem()
ClassLoaderDomainMBean
getSystem in interface ClassLoaderDomainMBeanpublic List<ObjectName> listClassLoaders()
ClassLoaderDomainMBean
listClassLoaders in interface ClassLoaderDomainMBeanpublic Map<String,List<ObjectName>> listExportingClassLoaders()
ClassLoaderDomainMBean
listExportingClassLoaders in interface ClassLoaderDomainMBeanpublic List<ObjectName> listExportingClassLoaders(String packageName)
ClassLoaderDomainMBean
listExportingClassLoaders in interface ClassLoaderDomainMBeanpackageName - the package name
public ObjectName findClassLoaderForClass(String name)
throws ClassNotFoundException
ClassLoaderDomainMBean
findClassLoaderForClass in interface ClassLoaderDomainMBeanname - the class name
ClassNotFoundException - when the class is not found
public Set<URL> loadResources(String name)
throws IOException
ClassLoaderDomainMBean
loadResources in interface ClassLoaderDomainMBeanname - the name of the resource
IOException - for any errorprotected void toLongString(StringBuilder builder)
toLongString in class BaseClassLoaderDomainbuilder - the builderpublic String toString()
toString in class Objectprotected Class<?> loadClassBefore(String name)
BaseClassLoaderDomain
loadClassBefore in class BaseClassLoaderDomainname - the class name
protected Class<?> loadClassAfter(String name)
BaseClassLoaderDomain
loadClassAfter in class BaseClassLoaderDomainname - the class name
protected Class<?> loadClassFromParent(String name)
name - the name
protected Loader findBeforeLoader(String name)
BaseClassLoaderDomain
findBeforeLoader in class BaseClassLoaderDomainname - the class resource name
protected Loader findAfterLoader(String name)
BaseClassLoaderDomain
findAfterLoader in class BaseClassLoaderDomainname - the class resource name
protected Loader findLoaderFromParent(String name)
name - the name
protected URL beforeGetResource(String name)
BaseClassLoaderDomain
beforeGetResource in class BaseClassLoaderDomainname - the resource name
protected URL afterGetResource(String name)
BaseClassLoaderDomain
afterGetResource in class BaseClassLoaderDomainname - the resource name
protected URL getResourceFromParent(String name)
name - the name
protected void beforeGetResources(String name,
Set<URL> urls)
throws IOException
BaseClassLoaderDomain
beforeGetResources in class BaseClassLoaderDomainname - the resource nameurls - the urls to add to
IOException - for any error
protected void afterGetResources(String name,
Set<URL> urls)
throws IOException
BaseClassLoaderDomain
afterGetResources in class BaseClassLoaderDomainname - the resource nameurls - the urls to add to
IOException - for any error
protected void getResourcesFromParent(String name,
Set<URL> urls)
throws IOException
name - the nameurls - the urls to add to
IOException - for any errorprotected Package beforeGetPackage(String name)
BaseClassLoaderDomain
beforeGetPackage in class BaseClassLoaderDomainname - the package name
protected Package afterGetPackage(String name)
BaseClassLoaderDomain
afterGetPackage in class BaseClassLoaderDomainname - the package name
protected Package getPackageFromParent(String name)
name - the name
protected void beforeGetPackages(Set<Package> packages)
BaseClassLoaderDomain
beforeGetPackages in class BaseClassLoaderDomainpackages - the packages to add toprotected void afterGetPackages(Set<Package> packages)
BaseClassLoaderDomain
afterGetPackages in class BaseClassLoaderDomainpackages - the packages to add to
protected void getPackagesFromParent(Set<Package> packages,
ClassFilter filter)
packages - the packages to add tofilter - the filter
public ObjectName preRegister(MBeanServer server,
ObjectName name)
throws Exception
preRegister in interface MBeanRegistrationExceptionpublic void postRegister(Boolean registrationDone)
postRegister in interface MBeanRegistration
public void preDeregister()
throws Exception
preDeregister in interface MBeanRegistrationExceptionpublic void postDeregister()
postDeregister in interface MBeanRegistration
protected void afterRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
BaseClassLoaderDomain
afterRegisterClassLoader in class BaseClassLoaderDomainclassLoader - the classloaderpolicy - the classloader policy
protected void beforeUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
BaseClassLoaderDomain
beforeUnregisterClassLoader in class BaseClassLoaderDomainclassLoader - the classloaderpolicy - the classloader policyprotected void registerClassLoaderMBean(ClassLoader cl)
cl - the classloaderprotected void unregisterClassLoaderMBean(ClassLoader cl)
cl - the classloader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||