Annotation Interface ServiceProvider
Also results in the automatic generation of service descriptor files (a.k.a.
META-INF/services
).
- See Also:
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionString[]
A list of attribute or directive names and values.The effective time of theosgi.extender
requirement.Class<?>
The type to register as the provider.The resolution policy of theosgi.extender
requirement.Class<?>[]
A list of classes whose packages are inspected to calculate theuses
directive for this capability.
-
Element Details
-
value
Class<?> valueThe service type.- Returns:
- the service type
-
-
-
effective
String effectiveThe effective time of theosgi.extender
requirement.Specifies the time the
osgi.extender
requirements are available. The OSGi framework resolver only considers requirements without an effective directive oreffective:=resolve
. Requirements with other values for the effective directive can be considered by an external agent.If not specified, the
effective
directive is omitted from the requirement clause.- Default:
- ""
-
uses
Class<?>[] usesA list of classes whose packages are inspected to calculate theuses
directive for this capability.If not specified, the
uses
directive is omitted from the capability clause.- Default:
- {}
-
attribute
String[] attributeA list of attribute or directive names and values.Each string should be specified in the form:
"name=value"
for attributes."name:type=value"
for typed attributes."name:=value"
for directives.
osgi.serviceloader
capability. Non-standardosgi.serviceloader
attributes will be included as service properties to the published service.- Default:
- {}
-
resolution
Resolution resolutionThe resolution policy of theosgi.extender
requirement.A mandatory requirement forbids the bundle to resolve when this requirement is not satisfied; an optional requirement allows a bundle to resolve even if this requirement is not satisfied.
If not specified, the
resolution
directive is omitted from the requirement clause.- Default:
- DEFAULT
-
register
Class<?> registerThe type to register as the provider.If the annotation used on a package, then
register()
must be set. It is optional when used on a type using the type as the value.The
register
directive is omitted from the requirement clause.- Default:
- java.lang.annotation.Target.class
-