org.apache.sling.event
Interface EventUtil.JobStatusNotifier

Enclosing class:
EventUtil

public static interface EventUtil.JobStatusNotifier

This is a private interface which is only public for import reasons.


Nested Class Summary
static class EventUtil.JobStatusNotifier.NotifierContext
           
 
Field Summary
static java.lang.String CONTEXT_PROPERTY_NAME
           
 
Method Summary
 boolean finishedJob(org.osgi.service.event.Event job, java.lang.String eventNodePath, boolean reschedule)
          Notify that the job is finished.
 boolean sendAcknowledge(org.osgi.service.event.Event job, java.lang.String eventNodePath)
          Send an acknowledge message that someone is processing the job.
 

Field Detail

CONTEXT_PROPERTY_NAME

static final java.lang.String CONTEXT_PROPERTY_NAME
Method Detail

sendAcknowledge

boolean sendAcknowledge(org.osgi.service.event.Event job,
                        java.lang.String eventNodePath)
Send an acknowledge message that someone is processing the job.

Parameters:
job - The job.
eventNodePath - The storage node in the repository.
Returns:
true if the ack is ok, false otherwise (e.g. if someone else already send an ack for this job.

finishedJob

boolean finishedJob(org.osgi.service.event.Event job,
                    java.lang.String eventNodePath,
                    boolean reschedule)
Notify that the job is finished. If the job is not rescheduled, a return value of false indicates an error during the processing. If the job should be rescheduled, true indicates that the job could be rescheduled. If an error occurs or the number of retries is exceeded, false will be returned.

Parameters:
job - The job.
eventNodePath - The storage node in the repository.
reschedule - Should the event be rescheduled?
Returns:
true if everything went fine, false otherwise.


Copyright © 2007-2009. All Rights Reserved.