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
| Methods inherited from class com.sun.enterprise.module.bootstrap.Main |
addRepo, createInhabitantsParser, createRepository, findMainModuleName, findModuleStartupClassName, findStartupService, getBootstrapFile, launch, launch, launch, launch, main, run, start |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HK2Main
public HK2Main()
createHabitat
public Habitat createHabitat(ModulesRegistry registry,
StartupContext context)
throws BootException
- Overrides:
createHabitat in class Main
- Throws:
BootException
start
public void start(org.osgi.framework.BundleContext context)
throws Exception
- Specified by:
start in interface org.osgi.framework.BundleActivator
- Throws:
Exception
createModulesRegistry
protected ModulesRegistry createModulesRegistry()
setParentClassLoader
protected void setParentClassLoader(StartupContext context,
ModulesRegistry mr)
throws BootException
- Overrides:
setParentClassLoader in class Main
- Throws:
BootException
stop
public void stop(org.osgi.framework.BundleContext context)
throws Exception
- Specified by:
stop in interface org.osgi.framework.BundleActivator
- Throws:
Exception
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
Copyright © 2012 Oracle Corporation. All Rights Reserved.