Package org.eclipse.sisu.launch
Class SisuExtender
java.lang.Object
org.eclipse.sisu.launch.SisuExtender
- All Implemented Interfaces:
org.osgi.framework.BundleActivator
OSGi extender that uses Sisu and Guice to wire up applications from one or more component bundles.
To enable it install
To enable it install
org.eclipse.sisu.inject.extender, or adapt the class for your own extender.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the mask of bundle states this extender is interested in.protected MutableBeanLocatorcreateLocator(org.osgi.framework.BundleContext context) Returns a new locator of bound components for this extender.protected SisuTrackercreateTracker(org.osgi.framework.BundleContext context) Creates a new tracker of component bundles for this extender.protected final MutableBeanLocatorfindLocator(org.osgi.framework.BundleContext context) Finds the locator associated with this extender; creates one if none exist.voidstart(org.osgi.framework.BundleContext context) voidstop(org.osgi.framework.BundleContext context)
-
Field Details
-
tracker
Tracker of component bundles.
-
-
Constructor Details
-
SisuExtender
public SisuExtender()
-
-
Method Details
-
start
public void start(org.osgi.framework.BundleContext context) - Specified by:
startin interfaceorg.osgi.framework.BundleActivator
-
stop
public void stop(org.osgi.framework.BundleContext context) - Specified by:
stopin interfaceorg.osgi.framework.BundleActivator
-
bundleStateMask
protected int bundleStateMask()Returns the mask of bundle states this extender is interested in.- Returns:
- State mask
-
createTracker
Creates a new tracker of component bundles for this extender.- Parameters:
context- The extender context- Returns:
- New bundle tracker
-
createLocator
Returns a new locator of bound components for this extender.- Parameters:
context- The extender context- Returns:
- New bean locator
-
findLocator
Finds the locator associated with this extender; creates one if none exist.- Parameters:
context- The extender context- Returns:
- Associated bean locator
-