public class Main extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAME |
| Constructor and Description |
|---|
Main() |
| Modifier and Type | Method and Description |
|---|---|
org.glassfish.hk2.api.ServiceLocator |
createServiceLocator(ModulesRegistry mr,
StartupContext context,
List<org.glassfish.hk2.api.PopulatorPostProcessor> postProcessors,
org.glassfish.hk2.api.DescriptorFileFinder descriptorFileFinder) |
protected void |
defineParentClassLoader() |
ModuleStartup |
findStartupService(ModulesRegistry registry,
org.glassfish.hk2.api.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() |
org.glassfish.hk2.api.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 argumentsBootExceptionprotected void defineParentClassLoader()
throws BootException
BootExceptionprotected 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 instanceBootExceptionpublic ModuleStartup findStartupService(ModulesRegistry registry, org.glassfish.hk2.api.ServiceLocator serviceLocator, String mainModuleName, StartupContext context) throws BootException
registry - serviceLocator - mainModuleName - context - BootExceptionpublic org.glassfish.hk2.api.ServiceLocator createServiceLocator(ModulesRegistry mr, StartupContext context, List<org.glassfish.hk2.api.PopulatorPostProcessor> postProcessors, org.glassfish.hk2.api.DescriptorFileFinder descriptorFileFinder) throws BootException
BootExceptionprotected void launch(ModuleStartup startupCode, StartupContext context) throws BootException
BootExceptionpublic org.glassfish.hk2.api.ServiceLocator getServiceLocator()
Copyright © 2009-2017 Oracle Corporation. All Rights Reserved.