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() |
ServiceLocator |
createServiceLocator(ModulesRegistry mr,
StartupContext context,
List<PopulatorPostProcessor> postProcessors,
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, start
public final String DEFAULT_NAME
public ServiceLocator createServiceLocator(ModulesRegistry mr, StartupContext context, List<PopulatorPostProcessor> postProcessors, DescriptorFileFinder descriptorFileFinder) throws BootException
createServiceLocator
in class Main
BootException
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
Exception
protected ModulesRegistry createModulesRegistry() throws Exception
Exception
protected void defineParentClassLoader() throws BootException
defineParentClassLoader
in class Main
BootException
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
Exception
public void bundleChanged(org.osgi.framework.BundleEvent event)
bundleChanged
in interface org.osgi.framework.BundleListener
Copyright © 2009–2023 Oracle Corporation. All rights reserved.