|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.classloader.spi.base.BaseClassLoaderPolicy
public abstract class BaseClassLoaderPolicy
Base ClassLoader policy.
This class hides some of the implementation details and allows package access to the protected methods.
Constructor Summary | |
---|---|
BaseClassLoaderPolicy()
Create a new BaseClassLoaderPolicy. |
Method Summary | |
---|---|
void |
addTranslator(org.jboss.util.loading.Translator translator)
Add the translator. |
protected void |
clearBlackList(String name)
Cleans the entry with the given name from the blackList |
protected AccessControlContext |
getAccessControlContext()
Get the access control context for this policy |
protected abstract List<? extends DelegateLoader> |
getDelegates()
Get the delegate loaders for imported stuff |
String |
getDomainName()
Get the classloader domain name |
protected abstract DelegateLoader |
getExported()
Get the delegate loader for exported stuff |
protected String |
getName()
Get a simple name for the classloader |
abstract ObjectName |
getObjectName()
Get the object name the classloader is registered in the MBeanServer with |
abstract String[] |
getPackageNames()
Get the exported packages |
protected abstract ProtectionDomain |
getProtectionDomain(String className,
String path)
Get the protection domain |
List<org.jboss.util.loading.Translator> |
getTranslators()
Get the policy's translators. |
protected abstract boolean |
isBlackListable()
Whether to cache misses |
protected abstract boolean |
isCacheable()
Whether to cache |
protected abstract boolean |
isImportAll()
Whether to import all exports from other classloaders in the domain |
protected abstract ClassLoader |
isJDKRequest(String name)
Check whether this a request from the jdk if it is return the relevant classloader |
void |
removeTranslator(org.jboss.util.loading.Translator translator)
Remove the translator. |
void |
setTranslators(List<org.jboss.util.loading.Translator> translators)
Set the translators. |
protected void |
shutdownPolicy()
Shutdown the policy |
String |
toLongString()
A long version of toString() |
protected void |
toLongString(StringBuilder builder)
For subclasses to add information for toLongString() |
String |
toString()
|
protected byte[] |
transform(String className,
byte[] byteCode,
ProtectionDomain protectionDomain)
Transform the byte code |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseClassLoaderPolicy()
SecurityException
- if the caller does not have permission to create a classloaderMethod Detail |
---|
protected AccessControlContext getAccessControlContext()
protected abstract DelegateLoader getExported()
NOTE: Protected access for security reasons
protected String getName()
public abstract String[] getPackageNames()
Provides a hint for indexing
protected abstract List<? extends DelegateLoader> getDelegates()
NOTE: Protected access for security reasons
protected abstract boolean isImportAll()
protected abstract ProtectionDomain getProtectionDomain(String className, String path)
NOTE: Defined as protected here for security reasons
className
- the class namepath
- the path
protected byte[] transform(String className, byte[] byteCode, ProtectionDomain protectionDomain) throws Exception
By default, this delegates to the domain
className
- the class namebyteCode
- the byte codeprotectionDomain
- the protection domain
Exception
- for any errorprotected abstract boolean isCacheable()
protected abstract boolean isBlackListable()
public abstract ObjectName getObjectName()
protected abstract ClassLoader isJDKRequest(String name)
name
- the class name
public String toLongString()
protected void toLongString(StringBuilder builder)
builder
- the builderpublic String toString()
toString
in class Object
public String getDomainName()
protected void shutdownPolicy()
The default implementation removes and shutdowns the classloader
protected void clearBlackList(String name)
name
- the name of the resource to clear from the blackListpublic List<org.jboss.util.loading.Translator> getTranslators()
public void setTranslators(List<org.jboss.util.loading.Translator> translators)
translators
- the translatorspublic void addTranslator(org.jboss.util.loading.Translator translator)
translator
- the translator to add
IllegalArgumentException
- for null translatorpublic void removeTranslator(org.jboss.util.loading.Translator translator)
translator
- the translator to remove
IllegalArgumentException
- for null translator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |