org.apache.s4.base.util
Class S4RLoaderFactory

java.lang.Object
  extended by org.apache.s4.base.util.S4RLoaderFactory

public class S4RLoaderFactory
extends java.lang.Object

Helper class for creating S4RLoader instances for a given S4R file.


Constructor Summary
S4RLoaderFactory()
           
 
Method Summary
 S4RLoader createS4RLoader(java.lang.String s4rPath)
          Explodes the s4r archive in a subdirectory of a user specified directory through "s4.tmp.dir" parameter, and prepares a classloader that will load classes and resources from, first, the application classes, then the dependencies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

S4RLoaderFactory

public S4RLoaderFactory()
Method Detail

createS4RLoader

public S4RLoader createS4RLoader(java.lang.String s4rPath)
Explodes the s4r archive in a subdirectory of a user specified directory through "s4.tmp.dir" parameter, and prepares a classloader that will load classes and resources from, first, the application classes, then the dependencies. Uses a temporary directory if s4.tmp.dir is not provided. Inspired from Hadoop's application classloading implementation (RunJar class).

Parameters:
s4rPath - path to s4r
Returns:
classloader that loads resources from the s4r in a predefined order