Annotation Type ServiceProvider
-
@Retention(CLASS) @Target({PACKAGE,TYPE}) @Repeatable(ServiceProviders.class) @Capability(name="${#value}",namespace="osgi.serviceloader",attribute={"register:=${#register}","${if;${size;${#uses}};uses:=\'${#uses}\'}","${sjoin;\\;;${#attribute}}"}) @Capability(namespace="osgi.service",attribute={"objectClass:List<String>=\"${#value}\"","${if;${size;${#uses}};uses:=\'${#uses}\'}","${sjoin;\\;;${#attribute}}"},effective="active") @Requirement(name="osgi.serviceloader.registrar", namespace="osgi.extender", version="1.0.0", attribute={"${if;${size;${#effective}};effective:=${#effective}}","${if;${is;${#resolution};default};;resolution:=${#resolution}}"}) public @interface ServiceProviderAnnotation used to generate requirements and capabilities necessary for supporting the provider side of the Service Loader Mediator specification.Also results in the automatic generation of service descriptor files (a.k.a.
META-INF/services).- See Also:
- Service Loader Mediator
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.Class<?>valueThe service type.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]attributeA list of attribute or directive names and values.java.lang.StringeffectiveThe effective time of theosgi.extenderrequirement.java.lang.Class<?>registerThe type to register as the provider.ResolutionresolutionThe resolution policy of theosgi.extenderrequirement.java.lang.Class<?>[]usesA list of classes whose packages are inspected to calculate theusesdirective for this capability.
-
-
-
-
effective
java.lang.String effective
The effective time of theosgi.extenderrequirement.Specifies the time the
osgi.extenderrequirements 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
effectivedirective is omitted from the requirement clause.- Default:
- ""
-
-
-
attribute
java.lang.String[] attribute
A 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.serviceloadercapability. Non-standardosgi.serviceloaderattributes will be included as service properties to the published service.- Default:
- {}
-
-
-
resolution
Resolution resolution
The resolution policy of theosgi.extenderrequirement.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
resolutiondirective is omitted from the requirement clause.- Default:
- aQute.bnd.annotation.Resolution.DEFAULT
-
-
-
register
java.lang.Class<?> register
The 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
registerdirective is omitted from the requirement clause.- Default:
- java.lang.annotation.Target.class
-
-