com.caucho.loader.osgi
Class ExportLoader

java.lang.Object
  extended by com.caucho.loader.Loader
      extended by com.caucho.loader.osgi.ExportLoader
All Implemented Interfaces:
Dependency

public class ExportLoader
extends Loader
implements Dependency

Class loader which checks for changes in class files and automatically picks up new jars.


Method Summary
protected  void buildClassPath(java.util.ArrayList<java.lang.String> pathList)
          Fill data for the class path.
protected  java.security.CodeSource getCodeSource(Path path)
          Returns the code source for the directory.
 Path getPath(java.lang.String pathName)
          Find a given path somewhere in the classpath
protected  void init()
          Initialize
 boolean isModified()
          True if the jar has been modified.
 boolean logModified(java.util.logging.Logger log)
          True if any of the loaded classes have been modified.
 void setLoader(DynamicClassLoader loader)
          Sets the owning class loader.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.loader.Loader
buildClassPath, buildSourcePath, buildSourcePath, destroy, getClassEntry, getLoader, getResource, getResourceAsStream, getResources, loadClass, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

init

protected void init()
Initialize


setLoader

public void setLoader(DynamicClassLoader loader)
Sets the owning class loader.

Overrides:
setLoader in class Loader

isModified

public boolean isModified()
True if the jar has been modified.

Specified by:
isModified in interface Dependency

logModified

public boolean logModified(java.util.logging.Logger log)
True if any of the loaded classes have been modified. If true, the caller should drop the classpath and create a new one.

Specified by:
logModified in interface Dependency

buildClassPath

protected void buildClassPath(java.util.ArrayList<java.lang.String> pathList)
Fill data for the class path. fillClassPath() will add all .jar and .zip files in the directory list.

Overrides:
buildClassPath in class Loader

getPath

public Path getPath(java.lang.String pathName)
Find a given path somewhere in the classpath

Overrides:
getPath in class Loader
Parameters:
pathName - the relative resourceName
Returns:
the matching path or null

getCodeSource

protected java.security.CodeSource getCodeSource(Path path)
Returns the code source for the directory.

Overrides:
getCodeSource in class Loader

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object