org.jboss.classloader.spi
Interface ClassLoaderDomainMBean

All Known Implementing Classes:
ClassLoaderDomain

public interface ClassLoaderDomainMBean

ClassLoaderSystemMBean.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Method Summary
 ObjectName findClassLoaderForClass(String name)
          Find the classloader for a class
 void flushCaches()
          Flush the caches
 int getClassBlackListSize()
          Get the number of classes black listed
 int getClassCacheSize()
          Get the number of classes cached
 String getName()
          Get the name.
 ObjectName getParentDomain()
          Get the parent
 String getParentDomainName()
          Get the parent
 String getParentPolicyName()
          Get the parent policy name
 int getResourceBlackListSize()
          Get the number of resources black listed
 int getResourceCacheSize()
          Get the number of resource cached
 ObjectName getSystem()
          Get the classloader system
 Set<String> listClassBlackList()
          Show the class blacklist
 Map<String,String> listClassCache()
          Show the class cache
 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
 Set<String> listResourceBlackList()
          Show the resource blacklist
 Map<String,URL> listResourceCache()
          Show the resource cache
 Class<?> loadClass(String name)
          Load a class
 Set<URL> loadResources(String name)
          Get resources
 

Method Detail

getSystem

ObjectName getSystem()
Get the classloader system

Returns:
the system

getName

String getName()
Get the name.

Returns:
the name.

getParentPolicyName

String getParentPolicyName()
Get the parent policy name

Returns:
the parent policy name.

getParentDomain

ObjectName getParentDomain()
Get the parent

Returns:
the parent.

getParentDomainName

String getParentDomainName()
Get the parent

Returns:
the parent.

listClassLoaders

List<ObjectName> listClassLoaders()
Get the classloaders

Returns:
the classloaders

listExportingClassLoaders

Map<String,List<ObjectName>> listExportingClassLoaders()
Get the exporting classloaders

Returns:
a map of packages to classloaders

listExportingClassLoaders

List<ObjectName> listExportingClassLoaders(String packageName)
Get the classloaders export a package

Parameters:
packageName - the package name
Returns:
the classloaders

loadClass

Class<?> loadClass(String name)
                   throws ClassNotFoundException
Load a class

Parameters:
name - the class name
Returns:
the class
Throws:
ClassNotFoundException - when the class is not found

loadResources

Set<URL> loadResources(String name)
                       throws IOException
Get resources

Parameters:
name - the name of the resource
Returns:
the resource urls
Throws:
IOException - for any error

findClassLoaderForClass

ObjectName findClassLoaderForClass(String name)
                                   throws ClassNotFoundException
Find the classloader for a class

Parameters:
name - the class name
Returns:
the classloader or null if it is not loaded by a managed classloader
Throws:
ClassNotFoundException - when the class is not found

listClassCache

Map<String,String> listClassCache()
Show the class cache

Returns:
a map of class name to a loader description

listClassBlackList

Set<String> listClassBlackList()
Show the class blacklist

Returns:
a set of class names

listResourceCache

Map<String,URL> listResourceCache()
Show the resource cache

Returns:
a map of resource name to urls

listResourceBlackList

Set<String> listResourceBlackList()
Show the resource blacklist

Returns:
a set of resource names

getClassBlackListSize

int getClassBlackListSize()
Get the number of classes black listed

Returns:
the size

getClassCacheSize

int getClassCacheSize()
Get the number of classes cached

Returns:
the size

getResourceBlackListSize

int getResourceBlackListSize()
Get the number of resources black listed

Returns:
the size

getResourceCacheSize

int getResourceCacheSize()
Get the number of resource cached

Returns:
the size

flushCaches

void flushCaches()
Flush the caches



Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.