| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.launchpad.base.shared.Loader
public class Loader
The Loader class provides utility methods for the actual
 launchers to help launching the framework.
| Constructor Summary | |
|---|---|
| Loader() | |
| Method Summary | |
|---|---|
| static void | cleanupVM()Tries to remove as many traces of class loaded by the framework from the Java VM as possible. | 
| static boolean | installLauncherJar(java.net.URL launcherJar,
                   java.lang.String slingHome)Copies the contents of the launcher JAR as indicated by the URL to the sling home directory and sets the last modification time stamp fo the file. | 
| static java.lang.Object | loadLauncher(java.lang.String launcherClassName,
             java.lang.String slingHome)Creates an URLClassLoader from a _launcher JAR_ file in the given slingHome directory and loads and returns the launcher class identified by the launcherClassName. | 
| static void | spool(java.io.InputStream ins,
      java.io.File destFile)Spools the contents of the input stream to the given file replacing the contents of the file with the contents of the input stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public Loader()
| Method Detail | 
|---|
public static java.lang.Object loadLauncher(java.lang.String launcherClassName,
                                            java.lang.String slingHome)
launcherClassName - The fully qualified name of a class implementing
            the Launcher interface. This class must have a public
            constructor taking no arguments.slingHome - The value to be used as ${slingHome}. This may be null
            in which case the sling folder in the current working
            directory is assumed. If this name is empty, the current
            working directory is assumed to be used as ${slingHome}.
java.lang.NullPointerException - if launcherClassName is null
java.lang.IllegalArgumentException - if the launcherClassName cannot be
             instantiated. The cause of the failure is contained as the
             cause of the exception.public static void cleanupVM()
This method must be called when the notifier is called.
public static boolean installLauncherJar(java.net.URL launcherJar,
                                         java.lang.String slingHome)
                                  throws java.io.IOException
true if the launcher JAR file has been installed or
         updated. If the launcher JAR is already up to date,
         false is returned.
java.io.IOException - If an error occurrs transferring the contents
public static void spool(java.io.InputStream ins,
                         java.io.File destFile)
                  throws java.io.IOException
java.io.IOException - If an error occurrs reading or writing the input
             stream contents.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||