|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.module.bootstrap.Main
public class Main
CLI entry point that will setup the module subsystem and delegate the main execution to the first archive in its import list... TODO: reusability of this class needs to be improved.
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
protected void |
addRepo(Repository repo,
ModulesRegistry mr,
String weight)
|
Habitat |
createHabitat(ModulesRegistry registry,
StartupContext context)
|
protected InhabitantsParser |
createInhabitantsParser(Habitat habitat)
Creates InhabitantsParser to fill in Habitat. |
protected void |
createRepository(File root,
File bootstrapJar,
Manifest mf,
ModulesRegistry mr)
Creates repositories needed for the launch and adds the repositories to ModulesRegistry |
protected String |
findMainModuleName(File bootstrap)
|
protected String |
findModuleStartupClassName(Module mainModule,
String serviceName,
String habitatName)
Finds ModuleStartup implementation class name to perform the launch. |
ModuleStartup |
findStartupService(ModulesRegistry registry,
Habitat habitat,
String mainModuleName,
StartupContext context)
Return the ModuleStartup service configured to be used to start the system. |
protected File |
getBootstrapFile()
We need to determine which jar file has been used to load this class Using the getResourceURL we can get this information, after that, it is just a bit of detective work to get the file path for the jar file. |
ModuleStartup |
launch(ModulesRegistry registry,
Habitat habitat,
String mainModuleName,
StartupContext context)
Launches the module system and hand over the execution to the ModuleStartup
implementation of the main module. |
Habitat |
launch(ModulesRegistry registry,
StartupContext context)
Launches the module system and hand over the execution to the ModuleStartup
implementation of the main module. |
Habitat |
launch(ModulesRegistry registry,
String mainModuleName,
StartupContext context)
|
protected void |
launch(ModuleStartup startupCode,
StartupContext context)
|
static void |
main(String[] args)
|
void |
run(String[] args)
|
protected void |
setParentClassLoader(StartupContext context,
ModulesRegistry mr)
|
void |
start(String[] args)
Start the server from the command line |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
public static void main(String[] args)
public void run(String[] args)
protected File getBootstrapFile()
throws BootException
BootException - If failed to determine the bootstrap file name.
public void start(String[] args)
throws BootException
args - the command line arguments
BootException
protected void setParentClassLoader(StartupContext context,
ModulesRegistry mr)
throws BootException
BootException
protected void createRepository(File root,
File bootstrapJar,
Manifest mf,
ModulesRegistry mr)
throws BootException
ModulesRegistry
bootstrapJar - The file from which manifest entries are loaded. Used for error reporting
BootException
protected void addRepo(Repository repo,
ModulesRegistry mr,
String weight)
throws IOException
IOException
public Habitat launch(ModulesRegistry registry,
StartupContext context)
throws BootException
ModuleStartup
implementation of the main module.
This version of the method auto-discoveres the main module.
If there's more than one ModuleStartup implementation, it is an error.
All the launch methods start additional threads and run GFv3, then return from the method.
context - startup context instance
BootException
public Habitat launch(ModulesRegistry registry,
String mainModuleName,
StartupContext context)
throws BootException
BootException
public ModuleStartup launch(ModulesRegistry registry,
Habitat habitat,
String mainModuleName,
StartupContext context)
throws BootException
ModuleStartup
implementation of the main module.
mainModuleName - The module that will provide ModuleStartup. If null,
one will be auto-discovered.context - startup context instance
BootException
public ModuleStartup findStartupService(ModulesRegistry registry,
Habitat habitat,
String mainModuleName,
StartupContext context)
throws BootException
registry - habitat - mainModuleName - context -
BootException
public Habitat createHabitat(ModulesRegistry registry,
StartupContext context)
throws BootException
BootExceptionprotected InhabitantsParser createInhabitantsParser(Habitat habitat)
InhabitantsParser to fill in Habitat.
Override for customizing the behavior.
protected String findMainModuleName(File bootstrap)
throws BootException
BootException
protected void launch(ModuleStartup startupCode,
StartupContext context)
throws BootException
BootException
protected String findModuleStartupClassName(Module mainModule,
String serviceName,
String habitatName)
throws BootException
ModuleStartup implementation class name to perform the launch.
This implementation does so by looking it up from services.
BootException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||