classpathhelper.tomcat.listener
Interface ITomcatClassLoaderService

All Known Implementing Classes:
TomcatClassLoaderService

public interface ITomcatClassLoaderService

Interface for a class that can create a hierarchy in Tomcat. Different implementations of this interface will represent the different versions of Tomcat, which have slightly different classloading rules.

Since:
1.0
Author:
bharris

Method Summary
 CGClassLoader createClassLoader(java.lang.String appName, CGClassLoaderFilter filter, FileChangeMonitor fileMonitor)
          Method that creates the appropriate class loader hierarchy consistent with the associated instance of Tomcat and the supplied application.
 java.lang.String[] getAppNames()
          Returns an array of application names in the associated Tomcat instance.
 

Method Detail

getAppNames

public java.lang.String[] getAppNames()
Returns an array of application names in the associated Tomcat instance.

Returns:
An array of application names, suitable for input to createClassLoader(java.lang.String, classpathhelper.CGClassLoaderFilter, classpathhelper.filechangelistener.FileChangeMonitor).
Since:
1.0

createClassLoader

public CGClassLoader createClassLoader(java.lang.String appName,
                                       CGClassLoaderFilter filter,
                                       FileChangeMonitor fileMonitor)
Method that creates the appropriate class loader hierarchy consistent with the associated instance of Tomcat and the supplied application.

Parameters:
appName - The application name, should be a value from getAppNames().
filter - The filter for the class loader.
fileMonitor - An optional (may be null) file monitor that will be populated with the files to monitor related to this classloader.
Returns:
A class loader consistent with the classloading of the supplied application, or null if the application name is invalid.
Since:
1.1