public class HK2Main extends Main implements org.osgi.framework.BundleActivator, org.osgi.framework.SynchronousBundleListener
BundleActivator that launches a Habitat.
A habitat is a collection of inhabitants, which are configured in a certain way.
So, there is a one-to-one mapping between habitat and configuration file used to configure the inhabitants.| Modifier and Type | Field and Description |
|---|---|
String |
DEFAULT_NAME |
| Constructor and Description |
|---|
HK2Main() |
| Modifier and Type | Method and Description |
|---|---|
void |
bundleChanged(org.osgi.framework.BundleEvent event) |
protected ModulesRegistry |
createModulesRegistry() |
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() |
void |
start(org.osgi.framework.BundleContext context) |
void |
stop(org.osgi.framework.BundleContext context) |
findStartupService, getBootstrapFile, getParentClassLoader, getServiceLocator, launch, launch, main, run, startpublic final String DEFAULT_NAME
public 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
createServiceLocator in class MainBootExceptionpublic void start(org.osgi.framework.BundleContext context)
throws Exception
start in interface org.osgi.framework.BundleActivatorExceptionprotected ModulesRegistry createModulesRegistry() throws Exception
Exceptionprotected void defineParentClassLoader()
throws BootException
defineParentClassLoader in class MainBootExceptionpublic void stop(org.osgi.framework.BundleContext context)
throws Exception
stop in interface org.osgi.framework.BundleActivatorExceptionpublic void bundleChanged(org.osgi.framework.BundleEvent event)
bundleChanged in interface org.osgi.framework.BundleListenerCopyright © 2009–2014 Oracle Corporation. All rights reserved.