public class JcrResourceListener extends Object implements javax.jcr.observation.EventListener, Closeable
JcrResourceListener listens for JCR observation
events and creates resource change events which are sent through
the ObservationReporter.| Constructor and Description |
|---|
JcrResourceListener(JcrListenerBaseConfig listenerConfig,
org.apache.sling.spi.resource.provider.ObserverConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Dispose this listener.
|
org.apache.sling.spi.resource.provider.ObserverConfiguration |
getConfig()
Get the observation configuration
|
void |
onEvent(javax.jcr.observation.EventIterator events) |
String |
toString() |
void |
update(org.apache.sling.spi.resource.provider.ObserverConfiguration cfg)
Update the observation configuration.
|
public JcrResourceListener(JcrListenerBaseConfig listenerConfig, org.apache.sling.spi.resource.provider.ObserverConfiguration config) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void update(org.apache.sling.spi.resource.provider.ObserverConfiguration cfg)
cfg - The updated configpublic org.apache.sling.spi.resource.provider.ObserverConfiguration getConfig()
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void onEvent(javax.jcr.observation.EventIterator events)
onEvent in interface javax.jcr.observation.EventListenerEventListener.onEvent(javax.jcr.observation.EventIterator)Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.