org.jvnet.hk2.osgiadapter
Class HK2Main
java.lang.Object
com.sun.enterprise.module.bootstrap.Main
org.jvnet.hk2.osgiadapter.HK2Main
- All Implemented Interfaces:
- java.util.EventListener, org.osgi.framework.BundleActivator, org.osgi.framework.BundleListener, org.osgi.framework.SynchronousBundleListener
public class HK2Main
- extends com.sun.enterprise.module.bootstrap.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
|
Method Summary |
void |
bundleChanged(org.osgi.framework.BundleEvent event)
|
org.jvnet.hk2.component.Habitat |
createHabitat(com.sun.enterprise.module.ModulesRegistry registry,
com.sun.enterprise.module.bootstrap.StartupContext context)
|
protected void |
createModulesRegistry()
|
protected void |
setParentClassLoader(com.sun.enterprise.module.bootstrap.StartupContext context,
com.sun.enterprise.module.ModulesRegistry mr)
|
void |
start(org.osgi.framework.BundleContext context)
|
void |
stop(org.osgi.framework.BundleContext context)
|
| 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 org.jvnet.hk2.component.Habitat createHabitat(com.sun.enterprise.module.ModulesRegistry registry,
com.sun.enterprise.module.bootstrap.StartupContext context)
throws com.sun.enterprise.module.bootstrap.BootException
- Overrides:
createHabitat in class com.sun.enterprise.module.bootstrap.Main
- Throws:
com.sun.enterprise.module.bootstrap.BootException
start
public void start(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
start in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
createModulesRegistry
protected void createModulesRegistry()
setParentClassLoader
protected void setParentClassLoader(com.sun.enterprise.module.bootstrap.StartupContext context,
com.sun.enterprise.module.ModulesRegistry mr)
throws com.sun.enterprise.module.bootstrap.BootException
- Overrides:
setParentClassLoader in class com.sun.enterprise.module.bootstrap.Main
- Throws:
com.sun.enterprise.module.bootstrap.BootException
stop
public void stop(org.osgi.framework.BundleContext context)
throws java.lang.Exception
- Specified by:
stop in interface org.osgi.framework.BundleActivator
- Throws:
java.lang.Exception
bundleChanged
public void bundleChanged(org.osgi.framework.BundleEvent event)
- Specified by:
bundleChanged in interface org.osgi.framework.BundleListener
Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.