@ConsumerType public interface ServiceReferenceMetadata extends ComponentMetadata
ReferenceListMetadata
and ReferenceMetadata
.Modifier and Type | Field and Description |
---|---|
static int |
AVAILABILITY_MANDATORY
A matching service is required at all times.
|
static int |
AVAILABILITY_OPTIONAL
A matching service is not required to be present.
|
ACTIVATION_EAGER, ACTIVATION_LAZY
Modifier and Type | Method and Description |
---|---|
int |
getAvailability()
Return whether or not a matching service is required at all times.
|
java.lang.String |
getComponentName()
Return the value of the
component-name attribute of the service
reference. |
java.lang.String |
getFilter()
Return the filter expression that a matching service must match.
|
java.lang.String |
getInterface()
Return the name of the interface type that a matching service must
support.
|
java.util.Collection<ReferenceListener> |
getReferenceListeners()
Return the reference listeners to receive bind and unbind events.
|
getActivation, getDependsOn, getId
static final int AVAILABILITY_MANDATORY
getAvailability()
,
Constant Field Valuesstatic final int AVAILABILITY_OPTIONAL
getAvailability()
,
Constant Field Valuesint getAvailability()
availability
attribute of the service
reference.AVAILABILITY_MANDATORY
,
AVAILABILITY_OPTIONAL
java.lang.String getInterface()
interface
attribute of the service
reference.null
when no interface name is specified.java.lang.String getComponentName()
component-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 automatic id
attribute.component-name
attribute of the service
reference or null
if the attribute is not specified.java.lang.String getFilter()
filter
attribute of the service
reference.null
if a filter is not specified.java.util.Collection<ReferenceListener> getReferenceListeners()
reference-listener
elements of the
service reference.ReferenceListener
objects to
receive bind and unbind events. The Collection is empty if no
reference listeners are specified for the service reference.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0