The annotated class is the implementation class of the Component.
This annotation is not processed at runtime by Service Component Runtime. It must be processed by tools and used to add a Component Description to the bundle.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | NAME
Special string representing the name of this Component. |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | |
| public ConfigurationPolicy | |
| public boolean | |
| public String | |
| public String[] | |
| public String[] | |
| public boolean | immediate()
Declares whether this Component must be immediately activated upon becoming satisfied or whether activation should be delayed. |
| public String | |
| public String[] | |
| public String[] | |
| public Reference[] | |
| public ServiceScope | |
| public Class | |
| public boolean | servicefactory()
Deprecated
Since 1.3. Replaced by
scope().
Declares whether this Component uses the OSGi ServiceFactory concept and each bundle using this Component's service will receive a different component instance. |
| public String |
| NAME | back to summary |
|---|---|
| public static final String NAME Special string representing the name of this Component.
This string can be used in
@Component(configurationPid={"com.acme.system", Component.NAME})
Tools creating a Component Description from this annotation must replace
the special string with the actual name of this Component.
| |
| configurationPid | back to summary |
|---|---|
| public String[] configurationPid() The configuration PIDs for the configuration of this Component. Each value specifies a configuration PID for this Component. If no value is specified, the name of this Component is used as the configuration PID of this Component.
A special string (
@Component(configurationPid={"com.acme.system", Component.NAME})
Tools creating a Component Description from this annotation must replace
the special string with the actual name of this Component.
| |
| configurationPolicy | back to summary |
|---|---|
| public ConfigurationPolicy configurationPolicy() The configuration policy of this Component. Controls whether component configurations must be satisfied depending on the presence of a corresponding Configuration object in the OSGi Configuration Admin service. A corresponding configuration is a Configuration object where the PID equals the name of the component.
If not specified, the configuration policy is based upon whether the
component is also annotated with the Meta Type
| |
| enabled | back to summary |
|---|---|
| public boolean enabled() Declares whether this Component is enabled when the bundle declaring it is started.
If
| |
| factory | back to summary |
|---|---|
| public String factory() The factory identifier of this Component. Specifying a factory identifier makes this Component a Factory Component. If not specified, the default is that this Component is not a Factory Component.
| |
| factoryProperties | back to summary |
|---|---|
| public String[] factoryProperties() Factory property entries for this Factory Component. Specifies the name of an entry in the bundle whose contents conform to a standard Java Properties File. The entry is read and processed to obtain the factory properties and their values.
If specified, the
| |
| factoryProperty | back to summary |
|---|---|
| public String[] factoryProperty() Factory properties for this Factory Component.
Each factory property string is specified as
To specify a factory property with multiple values, use multiple name,
value pairs. For example,
If specified, the
| |
| immediate | back to summary |
|---|---|
| public boolean immediate() Declares whether this Component must be immediately activated upon becoming satisfied or whether activation should be delayed.
If
If not specified, the default is
| |
| name | back to summary |
|---|---|
| public String name() The name of this Component. If not specified, the name of this Component is the fully qualified type name of the class being annotated.
| |
| properties | back to summary |
|---|---|
| public String[] properties() Property entries for this Component. Specifies the name of an entry in the bundle whose contents conform to a standard Java Properties File. The entry is read and processed to obtain the properties and their values.
| |
| property | back to summary |
|---|---|
| public String[] property() Properties for this Component.
Each property string is specified as
To specify a property with multiple values, use multiple name, value
pairs. For example,
| |
| reference | back to summary |
|---|---|
| public Reference[] reference() The lookup strategy references of this Component.
To access references using the lookup strategy,
To access references using method injection, bind methods are annotated
with
| |
| scope | back to summary |
|---|---|
| public ServiceScope scope() The service scope for the service of this Component.
If not specified (and the deprecated
| |
| service | back to summary |
|---|---|
| public Class The types under which to register this Component as a service.
If no service should be registered, the empty value
If not specified, the service types for this Component are all the directly implemented interfaces of the class being annotated.
| |
| servicefactory | back to summary |
|---|---|
| public boolean servicefactory()
Deprecated Since 1.3. Replaced by Declares whether this Component uses the OSGi ServiceFactory concept and each bundle using this Component's service will receive a different component instance.
This element is ignored when the
| |
| xmlns | back to summary |
|---|---|
| public String xmlns() The XML name space of the Component Description for this Component. If not specified, the XML name space of the Component Description for this Component should be the lowest Declarative Services XML name space which supports all the specification features used by this Component.
| |