sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r629099 - in /incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler: Job.java JobContext.java
Date Tue, 19 Feb 2008 14:00:23 GMT
Author: cziegeler
Date: Tue Feb 19 06:00:19 2008
New Revision: 629099

URL: http://svn.apache.org/viewvc?rev=629099&view=rev
Log:
Add some javadocs.

Modified:
    incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/Job.java
    incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/JobContext.java

Modified: incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/Job.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/Job.java?rev=629099&r1=629098&r2=629099&view=diff
==============================================================================
--- incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/Job.java
(original)
+++ incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/Job.java
Tue Feb 19 06:00:19 2008
@@ -16,8 +16,19 @@
  */
 package org.apache.sling.scheduler;
 
-
+/**
+ * A job is executed by the {@link Scheduler} service.
+ * If the implementation of the job requires certain environment information
+ * it can implement this interface to get additional information
+ * through the provided {@link JobContext}.
+ * If no additional information is required, implementing {@link Runnable} is
+ * sufficient.
+ */
 public interface Job {
 
+    /**
+     * Execute this job.
+     * @param context The context of the job.
+     */
     void execute(JobContext context);
 }

Modified: incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/JobContext.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/JobContext.java?rev=629099&r1=629098&r2=629099&view=diff
==============================================================================
--- incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/JobContext.java
(original)
+++ incubator/sling/trunk/sling/scheduler/src/main/java/org/apache/sling/scheduler/JobContext.java
Tue Feb 19 06:00:19 2008
@@ -21,6 +21,9 @@
 
 import org.apache.sling.api.services.ServiceLocator;
 
+/**
+ * The context for a {@link Job}.
+ */
 public interface JobContext {
 
     /**
@@ -29,10 +32,15 @@
      */
     String getName();
 
+    /**
+     * Get the configuration provided when the job was scheduled.
+     * @return A non-null map of values.
+     */
     Map<String, Serializable> getConfiguration();
 
     /**
      * Get the service locator.
+     * The service locator can be used to retrieve additional services.
      * @return The service locator.
      */
     ServiceLocator getServiceLocator();



Mime
View raw message