Package org.jvnet.hk2.osgiadapter
Class HK2Main
java.lang.Object
com.sun.enterprise.module.bootstrap.Main
org.jvnet.hk2.osgiadapter.HK2Main
- All Implemented Interfaces:
EventListener,org.osgi.framework.BundleActivator,org.osgi.framework.BundleListener,org.osgi.framework.SynchronousBundleListener
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.- Author:
- Sanjeeb.Sahoo@Sun.COM
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbundleChanged(org.osgi.framework.BundleEvent event) protected ModulesRegistryorg.glassfish.hk2.api.ServiceLocatorcreateServiceLocator(ModulesRegistry mr, StartupContext context, List<org.glassfish.hk2.api.PopulatorPostProcessor> postProcessors, org.glassfish.hk2.api.DescriptorFileFinder descriptorFileFinder) protected voidvoidstart(org.osgi.framework.BundleContext context) voidstop(org.osgi.framework.BundleContext context) Methods inherited from class com.sun.enterprise.module.bootstrap.Main
findStartupService, getBootstrapFile, getParentClassLoader, getServiceLocator, launch, launch, main, run, start
-
Field Details
-
DEFAULT_NAME
- See Also:
-
-
Constructor Details
-
HK2Main
public HK2Main()
-
-
Method Details
-
createServiceLocator
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 - Overrides:
createServiceLocatorin classMain- Throws:
BootException
-
start
- Specified by:
startin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
createModulesRegistry
- Throws:
Exception
-
defineParentClassLoader
- Overrides:
defineParentClassLoaderin classMain- Throws:
BootException
-
stop
- Specified by:
stopin interfaceorg.osgi.framework.BundleActivator- Throws:
Exception
-
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event) - Specified by:
bundleChangedin interfaceorg.osgi.framework.BundleListener
-