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 Details

    • BasicObservationReporter

      public BasicObservationReporter(List<String> searchPath, Collection<ResourceChangeListenerInfo> infos)
      Create a reporter listening for resource provider changes
      Parameters:
      searchPath - The search path
      infos - 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 paths
      infos - The listeners map
      providerPath - The mount point of the provider
      excludePaths - Excluded paths for that provider
  • Method Details

    • getObserverConfigurations

      public List<org.apache.sling.spi.resource.provider.ObserverConfiguration> getObserverConfigurations()
      Specified by:
      getObserverConfigurations in interface org.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 interface org.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 interface org.apache.sling.spi.resource.provider.ObservationReporter