@Repeatable(value=ServiceConsumers.class) @Retention(value=CLASS) @Target(value={PACKAGE,TYPE}) @Requirement(name="${#value}",namespace="osgi.serviceloader",attribute={"osgi.serviceloader=${#value}","${if;${is;${#cardinality};default};;cardinality:=${#cardinality}}","${if;${is;${#resolution};default};;resolution:=${#resolution}}"}) @Requirement(name="osgi.serviceloader.processor",namespace="osgi.extender",version="1.0.0",attribute="${if;${is;${#resolution};default};;resolution:=${#resolution}}") public @interface ServiceConsumer
| Modifier and Type | Required Element and Description |
|---|---|
Class<?> |
value
The service type.
|
| Modifier and Type | Optional Element and Description |
|---|---|
Cardinality |
cardinality
The cardinality of this requirement.
|
String |
effective
The effective time of the
osgi.serviceloader and
osgi.extender requirements. |
Resolution |
resolution
The resolution policy of the
osgi.serviceloader and
osgi.extender requirements. |
public abstract Class<?> value
@Directive public abstract String effective
osgi.serviceloader and
osgi.extender requirements.
Specifies the time the service loader requirements are available. The
OSGi framework resolver only considers requirements without an effective
directive or effective:=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.
public abstract Cardinality cardinality
Indicates if this requirement can be wired a single time or multiple times.
If not specified, the cardinality directive is omitted from the
requirement clause.
public abstract Resolution resolution
osgi.serviceloader and
osgi.extender requirements.
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.
Copyright © 2021. All rights reserved.