Interface ObserverConfiguration
- All Known Implementing Classes:
BasicObserverConfiguration
@ProviderType
public interface ObserverConfiguration
A observer configuration describes active configurations from registered listeners.
All implementations of
ObserverConfiguration
are comparable using the
Object.equals(Object)
method. Two configurations are equal, if they
have exactly the same parameters.
A resource provider implementation observation must support sending remove
events as explained in ResourceChangeListener
.
If an observer configuration contains a pattern or is limited to a sub tree,
removal events not matching the pattern or removing events of parents of
that sub tree must be provided to the listener nevertheless - if the
listener is interested in resource remove events.- Since:
- 1.0.0 (Sling API Bundle 2.11.0)
-
Method Summary
Modifier and TypeMethodDescription@NotNull Set<ResourceChange.ChangeType>
The set of types listeners are interested in.@NotNull PathSet
The set of excluded paths.@NotNull PathSet
getPaths()
The set of paths this listener is interested in.Set containing the set of property names which serves as an optional hint for the underlying to only report property changes enlisted, ie the underlying might ignore this.boolean
true
if a listener is interested in external events.boolean
Checks whether a path matches one of the paths of this configuration but is not in the excluded paths set.
-
Method Details
-
includeExternal
boolean includeExternal()true
if a listener is interested in external events.- Returns:
true
if a listener is interested in external events.
-
getPaths
The set of paths this listener is interested in. Each entry is absolute.- Returns:
- Non empty set of paths
-
getExcludedPaths
The set of excluded paths. All the paths are sub paths from one entry ofgetPaths()
- Returns:
- A set of excluded paths, might be empty.
-
getChangeTypes
The set of types listeners are interested in.- Returns:
- Non empty set of types
-
getPropertyNamesHint
Set containing the set of property names which serves as an optional hint for the underlying to only report property changes enlisted, ie the underlying might ignore this.- Returns:
- Set containing the set of property names or
null
-
matches
Checks whether a path matches one of the paths of this configuration but is not in the excluded paths set.- Parameters:
path
- The path to check- Returns:
true
if the path matches the configuration.
-