@Retention(value=CLASS)
@Target(value={})
public @interface LookupReference
Component
.
The referenced service can be accessed using one of the locateService
methods of ComponentContext
.
This annotation is not processed at runtime by a Service Component Runtime implementation. It must be processed by tools and used to add a Component Description to the bundle.
In the generated Component Description for a component, the references must
be ordered in ascending lexicographical order (using String.compareTo
) of the reference name
s.
Modifier and Type | Required Element and Description |
---|---|
java.lang.String |
name
The name of this reference.
|
java.lang.Class<?> |
service
The type of the service to bind to this reference.
|
Modifier and Type | Optional Element and Description |
---|---|
ReferenceCardinality |
cardinality
The cardinality of the reference.
|
ReferencePolicy |
policy
The policy for the reference.
|
ReferencePolicyOption |
policyOption
The policy option for the reference.
|
ReferenceScope |
scope
The requested service scope for this Reference.
|
java.lang.String |
target
The target filter for the reference.
|
public abstract java.lang.String name
public abstract java.lang.Class<?> service
public abstract ReferenceCardinality cardinality
If not specified, the reference has a
1..1
cardinality.
public abstract ReferencePolicy policy
If not specified, the STATIC
reference
policy is used.
public abstract java.lang.String target
public abstract ReferencePolicyOption policyOption
If not specified, the RELUCTANT
reference policy option is used.
public abstract ReferenceScope scope
If not specified, the bundle
service scope
is requested.