org.apache.catalina.loader
Interface Reloader

All Known Implementing Classes:
FileClassLoader, StandardClassLoader

public interface Reloader

Internal interface that ClassLoader implementations may optionally implement to support the auto-reload functionality of StandardLoader.

Version:
$Revision: 1.2 $ $Date: 2000/09/21 20:06:04 $
Author:
Craig R. McClanahan

Method Summary
 void addAllowed(java.lang.String name)
          Add a new fully qualified class or resource name to which access will be allowed, even if the class or resource name would otherwise match one of the restricted patterns.
 void addRepository(java.lang.String repository)
          Add a new repository to the set of places this ClassLoader can look for classes to be loaded.
 void addRestricted(java.lang.String prefix)
          Add a fully qualified class or resource name prefix that, if it matches the name of a requested class or resource, will cause access to that class or resource to fail (unless the complete name is on the allowed list).
 void addSystem(java.lang.String prefix)
          Add a fully qualified class or resource name prefix that, if it matches the name of a requested class or resource, will cause access to that class or resource to be attempted in the system class loader only (bypassing the repositories defined in this class loader).
 java.lang.String[] findAllowed()
          Return a String array of the allowed class or resource name list for this class loader.
 java.lang.String[] findRepositories()
          Return a String array of the current repositories for this class loader.
 java.lang.String[] findRestricted()
          Return a String array of the restricted class or resource name prefixes for this class loader.
 java.lang.String[] findSystem()
          Return a Striong array of the sytsem class or resource name prefixes for this class loader.
 boolean modified()
          Have one or more classes or resources been modified so that a reload is appropriate?
 

Method Detail

addAllowed

public void addAllowed(java.lang.String name)
Add a new fully qualified class or resource name to which access will be allowed, even if the class or resource name would otherwise match one of the restricted patterns.
Parameters:
name - Class or resource name to allow access for

addRepository

public void addRepository(java.lang.String repository)
Add a new repository to the set of places this ClassLoader can look for classes to be loaded.
Parameters:
repository - Name of a source of classes to be loaded, such as a directory pathname, a JAR file pathname, or a ZIP file pathname
Throws:
java.lang.IllegalArgumentException - if the specified repository is invalid or does not exist

addRestricted

public void addRestricted(java.lang.String prefix)
Add a fully qualified class or resource name prefix that, if it matches the name of a requested class or resource, will cause access to that class or resource to fail (unless the complete name is on the allowed list).
Parameters:
prefix - The restricted prefix

addSystem

public void addSystem(java.lang.String prefix)
Add a fully qualified class or resource name prefix that, if it matches the name of a requested class or resource, will cause access to that class or resource to be attempted in the system class loader only (bypassing the repositories defined in this class loader). By default, the java. prefix is defined as a system prefix.
Parameters:
prefix - The system prefix

findAllowed

public java.lang.String[] findAllowed()
Return a String array of the allowed class or resource name list for this class loader. If there are none, a zero-length array is returned.

findRepositories

public java.lang.String[] findRepositories()
Return a String array of the current repositories for this class loader. If there are no repositories, a zero-length array is returned.

findRestricted

public java.lang.String[] findRestricted()
Return a String array of the restricted class or resource name prefixes for this class loader. If there are none, a zero-length array is returned.

findSystem

public java.lang.String[] findSystem()
Return a Striong array of the sytsem class or resource name prefixes for this class loader. If there are none, a zero-length array is returned.

modified

public boolean modified()
Have one or more classes or resources been modified so that a reload is appropriate?


Copyright © 2000 Apache Software Foundation. All Rights Reserved.