Package fish.payara.micro.boot.loader
Class ExecutableArchiveLauncher
- java.lang.Object
-
- fish.payara.micro.boot.loader.Launcher
-
- fish.payara.micro.boot.loader.ExecutableArchiveLauncher
-
- Direct Known Subclasses:
PayaraMicroLauncher
public abstract class ExecutableArchiveLauncher extends Launcher
Base class for executable archiveLaunchers.- Author:
- Phillip Webb, Andy Wilkinson
-
-
Constructor Summary
Constructors Modifier Constructor Description ExecutableArchiveLauncher()protectedExecutableArchiveLauncher(Archive archive)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected ArchivegetArchive()protected List<Archive>getClassPathArchives()Returns the archives that will be used to construct the class path.protected StringgetMainClass()Returns the main class that should be launched.protected abstract booleanisNestedArchive(Archive.Entry entry)Determine if the specifiedJarEntryis a nested item that should be added to the classpath.protected voidpostProcessClassPathArchives(List<Archive> archives)Called to post-process archive entries before they are used.-
Methods inherited from class fish.payara.micro.boot.loader.Launcher
createArchive, createClassLoader, createClassLoader, createMainMethodRunner, launch, launch
-
-
-
-
Constructor Detail
-
ExecutableArchiveLauncher
public ExecutableArchiveLauncher()
-
ExecutableArchiveLauncher
protected ExecutableArchiveLauncher(Archive archive)
-
-
Method Detail
-
getArchive
protected final Archive getArchive()
-
getMainClass
protected String getMainClass() throws Exception
Description copied from class:LauncherReturns the main class that should be launched.- Specified by:
getMainClassin classLauncher- Returns:
- the name of the main class
- Throws:
Exception- if the main class cannot be obtained
-
getClassPathArchives
protected List<Archive> getClassPathArchives() throws Exception
Description copied from class:LauncherReturns the archives that will be used to construct the class path.- Specified by:
getClassPathArchivesin classLauncher- Returns:
- the class path archives
- Throws:
Exception- if the class path archives cannot be obtained
-
isNestedArchive
protected abstract boolean isNestedArchive(Archive.Entry entry)
Determine if the specifiedJarEntryis a nested item that should be added to the classpath. The method is called once for each entry.- Parameters:
entry- the jar entry- Returns:
trueif the entry is a nested item (jar or folder)
-
postProcessClassPathArchives
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception
Called to post-process archive entries before they are used. Implementations can add and remove entries.- Parameters:
archives- the archives- Throws:
Exception- if the post processing fails
-
-