Interface ServiceReferenceMetadata
- All Superinterfaces:
ComponentMetadata
,Metadata
,NonNullMetadata
- All Known Subinterfaces:
ReferenceListMetadata
,ReferenceMetadata
Metadata for a reference to an OSGi service. This is the base type for
ReferenceListMetadata
and ReferenceMetadata
.- Author:
- $Id: 059d8f84a3078bbba9cba14f4d5ac2546d509d29 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A matching service is required at all times.static final int
A matching service is not required to be present.Fields inherited from interface org.osgi.service.blueprint.reflect.ComponentMetadata
ACTIVATION_EAGER, ACTIVATION_LAZY
-
Method Summary
Modifier and TypeMethodDescriptionint
Return whether or not a matching service is required at all times.Return the value of thecomponent-name
attribute of the service reference.Return the filter expression that a matching service must match.Return the name of the interface type that a matching service must support.Return the reference listeners to receive bind and unbind events.Methods inherited from interface org.osgi.service.blueprint.reflect.ComponentMetadata
getActivation, getDependsOn, getId
-
Field Details
-
AVAILABILITY_MANDATORY
static final int AVAILABILITY_MANDATORYA matching service is required at all times.- See Also:
-
AVAILABILITY_OPTIONAL
static final int AVAILABILITY_OPTIONALA matching service is not required to be present.- See Also:
-
-
Method Details
-
getAvailability
int getAvailability()Return whether or not a matching service is required at all times. This is specified in theavailability
attribute of the service reference.- Returns:
- Whether or not a matching service is required at all times.
- See Also:
-
getInterface
String getInterface()Return the name of the interface type that a matching service must support. This is specified in theinterface
attribute of the service reference.- Returns:
- The name of the interface type that a matching service must
support or
null
when no interface name is specified.
-
getComponentName
String getComponentName()Return the value of thecomponent-name
attribute of the service reference. This specifies the id of a component that is registered in the service registry. This will create an automatic filter, appended with the filter if set, to select this component based on its automaticid
attribute.- Returns:
- The value of the
component-name
attribute of the service reference ornull
if the attribute is not specified.
-
getFilter
String getFilter()Return the filter expression that a matching service must match. This is specified by thefilter
attribute of the service reference.- Returns:
- The filter expression that a matching service must match or
null
if a filter is not specified.
-
getReferenceListeners
Collection<ReferenceListener> getReferenceListeners()Return the reference listeners to receive bind and unbind events. This is specified by thereference-listener
elements of the service reference.- Returns:
- An immutable Collection of
ReferenceListener
objects to receive bind and unbind events. The Collection is empty if no reference listeners are specified for the service reference.
-