KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > taskman > TransientTaskDescriptor


1 package org.sapia.taskman;
2
3 /**
4  * A task descriptor used to wrap tasks that are to be executed only once and
5  * then discarded.
6  *
7  * @author Yanick Duchesne 15-Apr-2003
8  * <dl>
9  * <dt><b>Copyright: </b>
10  * <dd>Copyright &#169; 2002-2004 <a
11  * HREF="http://www.sapia-oss.org">Sapia Open Source Software </a>. All
12  * Rights Reserved.</dd>
13  * </dt>
14  * <dt><b>License: </b>
15  * <dd>Read the license.txt file of the jar or visit the <a
16  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the
17  * Sapia OSS web site</dd>
18  * </dt>
19  * </dl>
20  */

21 public class TransientTaskDescriptor extends TaskDescriptor {
22   
23   static final long serialVersionUID = 1L;
24   
25   /**
26    * Constructor for TransientTaskDescriptor.
27    *
28    * @param name
29    * the name to which the task will correspond.
30    * @param delay
31    * the delay after which the wrapped task should be executed, once
32    * added to a <code>TaskManager</code>.
33    * @param t
34    * the <code>Task</code> to execute.
35    *
36    * @see TaskManager
37    */

38   public TransientTaskDescriptor(String JavaDoc name, long delay, Task t) {
39     super(name, TaskDescriptor.TRANSIENT, delay, t);
40   }
41
42   /**
43    * Creates a <code>TransientTaskDescriptor</code> whose <code>Task</code>
44    * will be executed ASAP - once added to a <code>TaskManager</code>.
45    *
46    * @param name
47    * the name to which the task will correspond.
48    * @param t
49    * the <code>Task</code> to execute.
50    *
51    * @see TaskManager
52    */

53   public TransientTaskDescriptor(String JavaDoc name, Task t) {
54     super(name, TaskDescriptor.TRANSIENT, 0, t);
55   }
56 }
57
Popular Tags