Interface ObserverConfiguration
-
@ProviderType public interface ObserverConfiguration
A observer configuration describes active configurations from registered listeners. All implementations ofObserverConfigurationare comparable using theObject.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 inResourceChangeListener. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull java.util.Set<ResourceChange.ChangeType>getChangeTypes()The set of types listeners are interested in.@NotNull PathSetgetExcludedPaths()The set of excluded paths.@NotNull PathSetgetPaths()The set of paths this listener is interested in.@NotNull java.util.Set<java.lang.String>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.booleanincludeExternal()trueif a listener is interested in external events.booleanmatches(java.lang.String path)Checks whether a path matches one of the paths of this configuration but is not in the excluded paths set.
-
-
-
Method Detail
-
includeExternal
boolean includeExternal()
trueif a listener is interested in external events.- Returns:
trueif a listener is interested in external events.
-
getPaths
@NotNull @NotNull PathSet getPaths()
The set of paths this listener is interested in. Each entry is absolute.- Returns:
- Non empty set of paths
-
getExcludedPaths
@NotNull @NotNull PathSet 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
@NotNull @NotNull java.util.Set<ResourceChange.ChangeType> getChangeTypes()
The set of types listeners are interested in.- Returns:
- Non empty set of types
-
getPropertyNamesHint
@NotNull @NotNull java.util.Set<java.lang.String> 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
boolean matches(java.lang.String path)
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:
trueif the path matches the configuration.
-
-