|
||||||||||
| 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.
| Field Summary | |
|---|---|
static String |
DEFAULT_NAME
|
| Constructor Summary | |
|---|---|
Main()
|
|
| Method Summary | |
|---|---|
protected void |
createServiceLocator()
|
ServiceLocator |
createServiceLocator(StartupContext context)
|
protected void |
defineParentClassLoader()
|
protected String |
findMainModuleName(File bootstrap)
|
ModuleStartup |
findStartupService(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. |
protected DescriptorFileFinder |
getDescriptorFileFinder()
|
protected ClassLoader |
getParentClassLoader()
|
protected PopulatorPostProcessor |
getPopulatorPostProcessor()
|
ServiceLocator |
getServiceLocator()
|
protected void |
launch(ModuleStartup startupCode,
StartupContext context)
|
ModuleStartup |
launch(String mainModuleName,
StartupContext context)
Launches the module system and hand over the execution to the ModuleStartup implementation of the main module. |
static void |
main(String[] args)
|
protected void |
populate()
Creates InhabitantsParser to fill in Habitat. |
void |
run(String[] args)
|
protected void |
setDescriptorFileFinder(DescriptorFileFinder descriptorFileFinder)
|
protected void |
setPopulatorPostProcessor(PopulatorPostProcessor populatorPostProcessor)
|
protected void |
setServiceLocator(ServiceLocator serviceLocator)
|
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 |
| Field Detail |
|---|
public static final String DEFAULT_NAME
| 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
BootExceptionprotected void createServiceLocator()
protected void defineParentClassLoader()
throws BootException
BootExceptionprotected ClassLoader getParentClassLoader()
public ModuleStartup launch(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(String mainModuleName,
StartupContext context)
throws BootException
registry - habitat - mainModuleName - context -
BootException
public ServiceLocator createServiceLocator(StartupContext context)
throws BootException
BootException
protected void populate()
throws IOException
InhabitantsParser to fill in Habitat. Override
for customizing the behavior.
IOException
protected String findMainModuleName(File bootstrap)
throws BootException
BootException
protected void launch(ModuleStartup startupCode,
StartupContext context)
throws BootException
BootExceptionpublic ServiceLocator getServiceLocator()
protected void setServiceLocator(ServiceLocator serviceLocator)
protected DescriptorFileFinder getDescriptorFileFinder()
protected void setDescriptorFileFinder(DescriptorFileFinder descriptorFileFinder)
protected PopulatorPostProcessor getPopulatorPostProcessor()
protected void setPopulatorPostProcessor(PopulatorPostProcessor populatorPostProcessor)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||