org.apache.sling.event.impl.jobs
Interface JobStatusNotifier

All Known Implementing Classes:
AbstractJobQueue, AbstractParallelJobQueue, OrderedJobQueue, ParallelJobQueue, TopicRoundRobinJobQueue

public interface JobStatusNotifier


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

Field Detail

CONTEXT_PROPERTY_NAME

static final String CONTEXT_PROPERTY_NAME
Method Detail

sendAcknowledge

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

Parameters:
job - The job.
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,
                    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.
reschedule - Should the event be rescheduled?
Returns:
true if everything went fine, false otherwise.


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.