|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.boot.loader.Launcher
public abstract class Launcher
Base class for launchers that can start an application with a fully configured classpath.
| Constructor Summary | |
|---|---|
Launcher()
|
|
| Method Summary | |
|---|---|
protected ClassLoader |
createClassLoader(List<Archive> lib)
Create a classloader for the specified lib. |
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 String |
getMainClass(Archive archive)
Obtain the main class that should be used to launch the application. |
protected abstract boolean |
isNestedArchive(Archive.Entry jarEntry)
Determine if the specified JarEntry is a nested item that should be added
to the classpath. |
void |
launch(String[] args)
Launch the application. |
protected void |
launch(String[] args,
Archive archive)
Launch the application given the archive file |
protected void |
launch(String[] args,
Archive archive,
ClassLoader classLoader)
Launch the application given the archive file and a fully configured classloader. |
protected void |
launch(String[] args,
ProtectionDomain protectionDomain)
Launch the application given the protection domain. |
protected void |
postProcessLib(Archive archive,
List<Archive> lib)
Called to post-process lib entries before they are used. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Launcher()
| Method Detail |
|---|
public void launch(String[] args)
public static void main(String[] args) method.
args - the incoming arguments
protected void launch(String[] args,
ProtectionDomain protectionDomain)
throws Exception
args - the incoming argumentsprotectionDomain - the protection domain
Exception
protected void launch(String[] args,
Archive archive)
throws Exception
args - the incoming argumentsarchive - the underlying (zip/war/jar) archive
Exceptionprotected abstract boolean isNestedArchive(Archive.Entry jarEntry)
JarEntry is a nested item that should be added
to the classpath. The method is called once for each entry.
jarEntry - the jar entry
true if the entry is a nested item (jar or folder)
protected void postProcessLib(Archive archive,
List<Archive> lib)
throws Exception
archive - the archivelib - the existing lib
Exception
protected ClassLoader createClassLoader(List<Archive> lib)
throws Exception
lib - the lib
Exception
protected ClassLoader createClassLoader(URL[] urls)
throws Exception
urls - the URLs
Exception
protected void launch(String[] args,
Archive archive,
ClassLoader classLoader)
throws Exception
args - the incoming argumentsarchive - the archiveclassLoader - the classloader
Exception
protected String getMainClass(Archive archive)
throws Exception
Start-Class manifest entry.
archive - the archive
Exception
protected Runnable createMainMethodRunner(String mainClass,
String[] args,
ClassLoader classLoader)
throws Exception
MainMethodRunner used to launch the application.
mainClass - the main classargs - the incoming argumentsclassLoader - the classloader
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||