public abstract class AbstractJcrEventTrigger extends Object implements DistributionTrigger
DistributionTrigger that listens for 'safe'
events and triggers a DistributionRequest from that.| Modifier and Type | Method and Description |
|---|---|
void |
disable() |
void |
enable() |
protected abstract org.apache.sling.distribution.DistributionRequest |
processEvent(javax.jcr.observation.Event event)
process the received event and generates a distribution request
|
void |
register(@NotNull DistributionRequestHandler requestHandler)
register a request handler to be triggered and returns a corresponding registration id
|
void |
unregister(@NotNull DistributionRequestHandler requestHandler)
unregister the given handler, if existing
|
public void register(@NotNull
@NotNull DistributionRequestHandler requestHandler)
throws DistributionException
DistributionTriggerregister in interface DistributionTriggerrequestHandler - handlerDistributionException - if registration failspublic void unregister(@NotNull
@NotNull DistributionRequestHandler requestHandler)
throws DistributionException
DistributionTriggerunregister in interface DistributionTriggerrequestHandler - handler to unregisterDistributionException - if any error happenpublic void enable()
public void disable()
protected abstract org.apache.sling.distribution.DistributionRequest processEvent(javax.jcr.observation.Event event)
throws javax.jcr.RepositoryException
event - an Event to be processedDistributionRequest originated by processing the event,
or null if no request could be generatedjavax.jcr.RepositoryExceptionCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.