public abstract class Launcher extends Object
Archives.| Constructor and Description |
|---|
Launcher() |
| Modifier and Type | Method and Description |
|---|---|
protected Archive |
createArchive() |
protected ClassLoader |
createClassLoader(List<Archive> archives)
Create a classloader for the specified archives.
|
protected ClassLoader |
createClassLoader(URL[] urls)
Create a classloader for the specified URLs
|
protected Runnable |
createMainMethodRunner(String mainClass,
String[] args,
ClassLoader classLoader)
Create the
MainMethodRunner used to launch the application. |
protected abstract List<Archive> |
getClassPathArchives()
Returns the archives that will be used to construct the class path.
|
protected abstract String |
getMainClass()
Returns the main class that should be launched.
|
protected void |
launch(String[] args)
Launch the application.
|
protected void |
launch(String[] args,
String mainClass,
ClassLoader classLoader)
Launch the application given the archive file and a fully configured classloader.
|
protected Logger logger
protected void launch(String[] args)
public static void main(String[] args) method.args - the incoming argumentsprotected ClassLoader createClassLoader(List<Archive> archives) throws Exception
archives - the archivesExceptionprotected ClassLoader createClassLoader(URL[] urls) throws Exception
urls - the URLsExceptionprotected void launch(String[] args, String mainClass, ClassLoader classLoader) throws Exception
args - the incoming argumentsmainClass - the main class to runclassLoader - the classloaderExceptionprotected Runnable createMainMethodRunner(String mainClass, String[] args, ClassLoader classLoader) throws Exception
MainMethodRunner used to launch the application.mainClass - the main classargs - the incoming argumentsclassLoader - the classloaderExceptionprotected abstract String getMainClass() throws Exception
Exceptionprotected abstract List<Archive> getClassPathArchives() throws Exception
ExceptionCopyright © 2014 Pivotal Software, Inc.. All rights reserved.