org.jvnet.hk2.osgiadapter
Class OSGiInhabitantsParser
java.lang.Object
org.glassfish.hk2.inhabitants.InhabitantsParser
org.jvnet.hk2.osgiadapter.OSGiInhabitantsParser
- All Implemented Interfaces:
- InhabitantStore
public class OSGiInhabitantsParser
- extends InhabitantsParser
Parses /META-INF/inhabitants and
populate Habitat
.
and registers services in OSGi Service Registry.
- Author:
- Sanjeeb.Sahoo@Sun.COM
Field Summary |
static String |
SERVICE_NAME
When an HK2 service is defined with a name (using the name attribute
of Service annotation, then
the corresponding OSGi service is registered with the following
property name. |
Methods inherited from class org.glassfish.hk2.inhabitants.InhabitantsParser |
add, addIndex, drop, drop, isFilteredInhabitant, isFilteredInhabitant, parse, parseIndex, remove, removeIndex, removeIndex, replace, replace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_NAME
public static final String SERVICE_NAME
- When an HK2 service is defined with a name (using the name attribute
of
Service
annotation, then
the corresponding OSGi service is registered with the following
property name.
See ServiceRegistration.setProperties(java.util.Dictionary)
- See Also:
- Constant Field Values
OSGiInhabitantsParser
public OSGiInhabitantsParser(ServiceLocator serviceLocator,
org.osgi.framework.BundleContext ctx)
add
protected void add(Inhabitant i,
InhabitantParser parser)
- This method registers an equivalent service in OSGi's Service Registry.
The registered service would be registered with HK2 Service class name
in addition to all the contractNames.
- Overrides:
add
in class InhabitantsParser
- Parameters:
i
- Inhabitant which is being exposed as service objectparser
- the inhabitant metadata information
Copyright © 2013 Oracle Corporation. All Rights Reserved.