Package org.apache.sling.discovery
Interface PropertyProvider
@ConsumerType
public interface PropertyProvider
The
PropertyProvider
service interface may be implemented by
components that wish to define properties on the local instance which then
are broadcast to the TopologyView
instances.
The provided properties are registered with the PROPERTY_PROPERTIES
service property.
If the set of provided properties changes or one of the provided values
change, the service registration of the provider should be updated.
This avoids periodic polling for changes.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The name of the service registration property containing the names of the properties provided by this provider. -
Method Summary
Modifier and TypeMethodDescriptiongetProperty
(String name) Retrieves a property that is subsequently set on the local instance and broadcast to theTopologyView
instances.
-
Field Details
-
PROPERTY_PROPERTIES
The name of the service registration property containing the names of the properties provided by this provider. The value is either a string or an array of strings. A property name must only contain alphanumeric characters plus.
,_
,-
.- See Also:
-
-
Method Details
-
getProperty
Retrieves a property that is subsequently set on the local instance and broadcast to theTopologyView
instances. These properties are non-persistent and disappear after the local instance goes down.- Parameters:
name
- The property name- Returns:
- The value of the property or
null
. If the property value can't be provided or if the provider does not support this property, it must returnnull
.
-