Class NewJobSender
java.lang.Object
org.apache.sling.event.impl.jobs.notifications.NewJobSender
- All Implemented Interfaces:
ExternalResourceChangeListener
,ResourceChangeListener
public class NewJobSender
extends Object
implements ResourceChangeListener, ExternalResourceChangeListener
This component receives resource added events and sends a job
created event.
-
Field Summary
Fields inherited from interface org.apache.sling.api.resource.observation.ResourceChangeListener
CHANGE_ADDED, CHANGE_CHANGED, CHANGE_PROVIDER_ADDED, CHANGE_PROVIDER_REMOVED, CHANGE_REMOVED, CHANGES, PATHS, PROPERTY_NAMES_HINT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate
(org.osgi.framework.BundleContext bundleContext) Activate this component.protected void
Deactivate this component.void
onChange
(List<ResourceChange> resourceChanges) Report resource changes based on the filter properties of this listener.
-
Constructor Details
-
NewJobSender
public NewJobSender()
-
-
Method Details
-
activate
protected void activate(org.osgi.framework.BundleContext bundleContext) Activate this component. Register an event handler. -
deactivate
protected void deactivate()Deactivate this component. Unregister the event handler. -
onChange
Description copied from interface:ResourceChangeListener
Report resource changes based on the filter properties of this listener.Note that resource changes for paths which are ancestors of the paths this listener was registered to may be reported through this method. This is due to limitations of certain resource providers to provide events on a more granular level (e.g. for deletion or movement of resources containing (potentially nested) child resources).
Starting with version 1.2 of this API, an instance of
ResoureChangeList
is passed as the parameter to allow passing additional information.- Specified by:
onChange
in interfaceResourceChangeListener
- Parameters:
resourceChanges
- The changes list. This list is immutable.
-