org.apache.tomcat.core
Interface ServletLoader


public interface ServletLoader

Handle servlet and resource reloading


Method Summary
 void addRepository(java.io.File f)
          Add a new directory or jar to the class loader.
 void addRepository(java.net.URL url)
          Add a new remote repository.
 java.lang.ClassLoader getClassLoader()
          Return a real class loader
 java.lang.String getClassPath()
          Return the class loader view of the class path
 java.lang.Class loadClass(java.lang.String name)
          Handle servlet loading.
 void reload()
          Reset the class loader.
 boolean shouldReload()
          Check if we need to reload.
 boolean shouldReload(java.lang.String className)
          Check if we need to reload one particular class.
 

Method Detail

shouldReload

public boolean shouldReload(java.lang.String className)
Check if we need to reload one particular class. No check is done for dependent classes. The final decision about reloading is left to the caller.

shouldReload

public boolean shouldReload()
Check if we need to reload. All loaded classes are checked. The final decision about reloading is left to the caller.

reload

public void reload()
Reset the class loader. The caller should take all actions required by this step ( free resources for GC, etc)

getClassLoader

public java.lang.ClassLoader getClassLoader()
Return a real class loader

loadClass

public java.lang.Class loadClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Handle servlet loading. Same as getClassLoader().loadClass(name, true);

getClassPath

public java.lang.String getClassPath()
Return the class loader view of the class path

addRepository

public void addRepository(java.io.File f)
Add a new directory or jar to the class loader. Not all loaders can add resources dynamically - that may require a reload.

addRepository

public void addRepository(java.net.URL url)
Add a new remote repository. Not all class loader will support remote resources, use File if it's a local resource.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.