Top Description Methods
aQute.bnd.annotation.spi

public @Interface ServiceConsumer

extends Annotation
Annotations
@Repeatable:ServiceConsumers
@Retention:CLASS
@Target:PACKAGE, TYPE
@Requirements:@org.osgi.annotation.bundle.Requirement(name="${#value}", namespace="osgi.serviceloader", attribute={"osgi.serviceloader=${#value}", "${if;${is;${#cardinality};default};;cardinality:=${#cardinality}}", "${if;${is;${#resolution};default};;resolution:=${#resolution}}"}), @org.osgi.annotation.bundle.Requirement(name="osgi.serviceloader.processor", namespace="osgi.extender", version="1.0.0", attribute={"${if;${is;${#resolution};default};;resolution:=${#resolution}}"})
Static Imports
aQute.bnd.annotation.Constants.CARDINALITY_MACRO, .Constants.RESOLUTION_MACRO, aQute.bnd.annotation.spi.Constants.SERVICELOADER_PROCESSOR, .Constants.SERVICELOADER_VERSION, .Constants.VALUE_MACRO, java.lang.annotation.ElementType.PACKAGE, .ElementType.TYPE, .RetentionPolicy.CLASS, org.osgi.namespace.extender.ExtenderNamespace.EXTENDER_NAMESPACE, org.osgi.service.serviceloader.ServiceLoaderNamespace.SERVICELOADER_NAMESPACE

Annotation used to generate requirements necessary for supporting the consumer side of the Service Loader Mediator specification.
See Also
Service Loader Mediator

Method Summary

Modifier and TypeMethod and Description
public String
cardinality()

The cardinality of this requirement.

public String
effective()

The effective time of the osgi.serviceloader and osgi.extender requirements.

public String
resolution()

The resolution policy of the osgi.serviceloader and osgi.extender requirements.

public Class<?>

Returns:

the service type
value
()

The service type.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

cardinalityback to summary
public String cardinality()

The cardinality of this requirement.

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.

effectiveback to summary
public String effective()

The effective time of the 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.

Annotations
@Directive
resolutionback to summary
public String resolution()

The resolution policy of the 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.

valueback to summary
public Class<?> value()

The service type.

Returns:Class<?>

the service type