Class BasicObservationReporter
- java.lang.Object
-
- org.apache.sling.resourceresolver.impl.observation.BasicObservationReporter
-
- All Implemented Interfaces:
org.apache.sling.spi.resource.provider.ObservationReporter
public class BasicObservationReporter extends Object implements org.apache.sling.spi.resource.provider.ObservationReporter
Implementation of the observation reporter. Each resource provider gets its on instance.
-
-
Constructor Summary
Constructors Constructor Description BasicObservationReporter(List<String> searchPath, Collection<ResourceChangeListenerInfo> infos)
Create a reporter listening for resource provider changesBasicObservationReporter(List<String> searchPath, Collection<ResourceChangeListenerInfo> infos, org.apache.sling.api.resource.path.Path providerPath, org.apache.sling.api.resource.path.PathSet excludePaths)
Create a reporter listening for a provider
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.sling.spi.resource.provider.ObserverConfiguration>
getObserverConfigurations()
void
reportChanges(Iterable<org.apache.sling.api.resource.observation.ResourceChange> changes, boolean distribute)
void
reportChanges(org.apache.sling.spi.resource.provider.ObserverConfiguration config, Iterable<org.apache.sling.api.resource.observation.ResourceChange> changes, boolean distribute)
-
-
-
Constructor Detail
-
BasicObservationReporter
public BasicObservationReporter(List<String> searchPath, Collection<ResourceChangeListenerInfo> infos)
Create a reporter listening for resource provider changes- Parameters:
searchPath
- The search pathinfos
- The listeners map
-
BasicObservationReporter
public BasicObservationReporter(List<String> searchPath, Collection<ResourceChangeListenerInfo> infos, org.apache.sling.api.resource.path.Path providerPath, org.apache.sling.api.resource.path.PathSet excludePaths)
Create a reporter listening for a provider- Parameters:
searchPath
- The search pathsinfos
- The listeners mapproviderPath
- The mount point of the providerexcludePaths
- Excluded paths for that provider
-
-
Method Detail
-
getObserverConfigurations
public List<org.apache.sling.spi.resource.provider.ObserverConfiguration> getObserverConfigurations()
- Specified by:
getObserverConfigurations
in interfaceorg.apache.sling.spi.resource.provider.ObservationReporter
-
reportChanges
public void reportChanges(Iterable<org.apache.sling.api.resource.observation.ResourceChange> changes, boolean distribute)
- Specified by:
reportChanges
in interfaceorg.apache.sling.spi.resource.provider.ObservationReporter
-
reportChanges
public void reportChanges(org.apache.sling.spi.resource.provider.ObserverConfiguration config, Iterable<org.apache.sling.api.resource.observation.ResourceChange> changes, boolean distribute)
- Specified by:
reportChanges
in interfaceorg.apache.sling.spi.resource.provider.ObservationReporter
-
-