org.jboss.classloader.spi.base
Interface BaseClassLoaderMBean

All Known Implementing Classes:
BaseClassLoader

public interface BaseClassLoaderMBean

BaseClassLoaderMBean.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Method Summary
 void clearBlackList()
          Clear the black list
 void clearBlackList(String name)
          Clear an entry from the black list
 ObjectName findClassLoaderForClass(String name)
          Find the classloader for a class
 ObjectName getClassLoaderDomain()
          Get the classloader domain
 String getName()
          Get the name of the classloader
 int getResourceBlackListSize()
          Get the number of resources black listed
 int getResourceCacheSize()
          Get the number of resource cached
 boolean isBlackListable()
          Whether to cache misses
 boolean isCacheable()
          Whether to cache<
 boolean isImportAll()
          Whether to import all exports from other classloaders in the domain
 boolean isValid()
          Whether the classloader is still valid
 Set<String> listExportedPackages()
          Get the exported packages
 List<ObjectName> listImports()
          Get the imports of this classloader
 Set<String> listLoadedClasses()
          Get the loaded classes
 Set<String> listLoadedResourceNames()
          Get the loaded resource names
 Set<URL> listLoadedResources()
          Get the loaded resources
 String listPolicyDetails()
          Get the policy as a string
 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

getClassLoaderDomain

ObjectName getClassLoaderDomain()
Get the classloader domain

Returns:
the domain

getName

String getName()
Get the name of the classloader

Returns:
the name

isImportAll

boolean isImportAll()
Whether to import all exports from other classloaders in the domain

Returns:
true to import all

isCacheable

boolean isCacheable()
Whether to cache<

Returns:
true to cache

isBlackListable

boolean isBlackListable()
Whether to cache misses

Returns:
true to cache misses

isValid

boolean isValid()
Whether the classloader is still valid

Returns:
true when still valid

listExportedPackages

Set<String> listExportedPackages()
Get the exported packages

Returns:
the exported packages

listImports

List<ObjectName> listImports()
Get the imports of this classloader

Returns:
the imports

listPolicyDetails

String listPolicyDetails()
Get the policy as a string

Returns:
the policy string

listLoadedClasses

Set<String> listLoadedClasses()
Get the loaded classes

Returns:
the loaded classes

listLoadedResourceNames

Set<String> listLoadedResourceNames()
Get the loaded resource names

Returns:
the loaded resources names

listLoadedResources

Set<URL> listLoadedResources()
Get the loaded resources

Returns:
the loaded resources

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

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

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

clearBlackList

void clearBlackList()
Clear the black list


clearBlackList

void clearBlackList(String name)
Clear an entry from the black list

Parameters:
name - the name of the entry to remove


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