Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_NAME |
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
ServiceLocator |
createServiceLocator(ModulesRegistry mr,
StartupContext context,
List<PopulatorPostProcessor> postProcessors,
DescriptorFileFinder descriptorFileFinder) |
protected void |
defineParentClassLoader() |
ModuleStartup |
findStartupService(ModulesRegistry registry,
ServiceLocator serviceLocator,
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 ClassLoader |
getParentClassLoader() |
ServiceLocator |
getServiceLocator() |
ModuleStartup |
launch(ModulesRegistry registry,
String mainModuleName,
StartupContext context)
Launches the module system and hand over the execution to the
ModuleStartup implementation of the main module. |
protected void |
launch(ModuleStartup startupCode,
StartupContext context) |
static void |
main(String[] args) |
void |
run(String[] args) |
void |
start(String[] args)
Start the server from the command line
|
public static final String DEFAULT_NAME
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 argumentsBootException
protected void defineParentClassLoader() throws BootException
BootException
protected ClassLoader getParentClassLoader()
public ModuleStartup launch(ModulesRegistry registry, 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 instanceBootException
public ModuleStartup findStartupService(ModulesRegistry registry, ServiceLocator serviceLocator, String mainModuleName, StartupContext context) throws BootException
registry
- serviceLocator
- mainModuleName
- context
- BootException
public ServiceLocator createServiceLocator(ModulesRegistry mr, StartupContext context, List<PopulatorPostProcessor> postProcessors, DescriptorFileFinder descriptorFileFinder) throws BootException
BootException
protected void launch(ModuleStartup startupCode, StartupContext context) throws BootException
BootException
public ServiceLocator getServiceLocator()
Copyright © 2009–2023 Oracle Corporation. All rights reserved.