Author: cziegeler
Date: Mon Dec 23 10:50:52 2013
New Revision: 1553093
URL: http://svn.apache.org/r1553093
Log:
Correct javadocs
Modified:
sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java
Modified:
sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java
URL:
http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java?rev=1553093&r1=1553092&r2=1553093&view=diff
==============================================================================
---
sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java
(original)
+++
sling/trunk/bundles/extensions/event/src/main/java/org/apache/sling/event/jobs/consumer/JobExecutor.java
Mon Dec 23 10:50:52 2013
@@ -63,25 +63,28 @@ public interface JobExecutor {
/**
* Execute the job.
*
- * If the job has been processed successfully, {@link
JobExecutionContext#SUCCEEDED()} should be returned.
- * If the job has not been processed completely, but might be rescheduled
{@link JobExecutionContext#FAILED()}
- * should be returned.
- * If the job processing failed and should not be rescheduled, {@link
JobExecutionContext#CANCELLED()} should
- * be returned.
+ * If the job has been processed successfully, a job result of "succeeded"
should be returned. This result can
+ * be generated by calling
<code>JobExecutionContext.result().succeeded()</code>.
+ *
+ * If the job has not been processed completely, but might be rescheduled
"failed" should be returned.
+ * This result can be generated by calling
<code>JobExecutionContext.result().failed()</code>.
+ *
+ * If the job processing failed and should not be rescheduled, "cancelled"
should be returned.
+ * This result can be generated by calling
<code>JobExecutionContext.result().cancelled()</code>.
*
* If the executor decides to process the job asynchronously it should
return <code>null</code>
* and notify the job manager by using the {@link
JobExecutionContext#asyncProcessingFinished(JobExecutionResult)}
- * method.
+ * method of the processing result.
*
* If the processing fails with throwing an exception/throwable, the
process will not be rescheduled
- * and treated like the method would have returned {@link
JobExecutionContext#CANCELLED()}.
+ * and treated like the method would have returned a "cancelled" result.
*
- * Instead of the constants from the JobExecutionContext class, this
method can return a custom instance containing
- * additional information using the builder pattern available from {@link
JobExecutionContext#result(String)}.
+ * Additional information can be added to the result by using the builder
pattern available
+ * from {@link JobExecutionContext#result()}.
*
* @param job The job
* @param context The execution context.
- * @return The job execution result
+ * @return The job execution result or <code>null</code> for asynchronous
processing.
*/
JobExecutionResult process(Job job, JobExecutionContext context);
}