Package fish.payara.micro.boot
Class PayaraMicroLauncher
- java.lang.Object
-
- fish.payara.micro.boot.loader.Launcher
-
- fish.payara.micro.boot.loader.ExecutableArchiveLauncher
-
- fish.payara.micro.boot.PayaraMicroLauncher
-
public class PayaraMicroLauncher extends ExecutableArchiveLauncher
This class boots a Payara Micro Executable jar It establishes the Payara Micro Executable ClassLoader onto the main thread and then boots standard Payara Micro.- Author:
- steve
-
-
Constructor Summary
Constructors Constructor Description PayaraMicroLauncher()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PayaraMicroBootcreate(String[] args)static PayaraMicroBootgetBootClass()Boot method via Micro.getInstance()protected booleanisNestedArchive(Archive.Entry entry)Determine if the specifiedJarEntryis a nested item that should be added to the classpath.static voidmain(String[] args)Boot method via java -jarprotected voidpostProcessClassPathArchives(List<Archive> archives)Called to post-process archive entries before they are used.static voidregisterLaunchedInstance(PayaraMicroBoot instance)Called by Payara Micro implementation, so it can be discovered when not started by this launcher.-
Methods inherited from class fish.payara.micro.boot.loader.ExecutableArchiveLauncher
getArchive, getClassPathArchives, getMainClass
-
Methods inherited from class fish.payara.micro.boot.loader.Launcher
createArchive, createClassLoader, createClassLoader, createMainMethodRunner, launch, launch
-
-
-
-
Method Detail
-
main
public static void main(String[] args) throws Exception
Boot method via java -jar- Parameters:
args-- Throws:
Exception
-
create
public static PayaraMicroBoot create(String[] args) throws Exception
- Throws:
Exception
-
registerLaunchedInstance
public static void registerLaunchedInstance(PayaraMicroBoot instance)
Called by Payara Micro implementation, so it can be discovered when not started by this launcher.- Parameters:
instance-
-
getBootClass
public static PayaraMicroBoot getBootClass() throws InstantiationException, IllegalAccessException, ClassNotFoundException, Exception
Boot method via Micro.getInstance()- Returns:
- Throws:
InstantiationExceptionIllegalAccessExceptionClassNotFoundExceptionException
-
isNestedArchive
protected boolean isNestedArchive(Archive.Entry entry)
Description copied from class:ExecutableArchiveLauncherDetermine if the specifiedJarEntryis a nested item that should be added to the classpath. The method is called once for each entry.- Specified by:
isNestedArchivein classExecutableArchiveLauncher- 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
Description copied from class:ExecutableArchiveLauncherCalled to post-process archive entries before they are used. Implementations can add and remove entries.- Overrides:
postProcessClassPathArchivesin classExecutableArchiveLauncher- Parameters:
archives- the archives- Throws:
Exception- if the post processing fails
-
-