KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.taskman;
2
3 /**
4  * This interface is recognized by the TaskManager runtime. It can be implement
5  * by tasks that need to signal that they must be aborted, no matter what. <p/>
6  * This interface is useful in the case of periodic tasks: a given periodic
7  * task, scheduled to run at every N millis, could wish to signal to the task
8  * manager that it should be discarded, even if the end of its "period" has not
9  * yet been reached. <p/>In such a case, the given task needs only implementing
10  * this interface.
11  *
12  * @author Yanick Duchesne
13  * <dl>
14  * <dt><b>Copyright: </b>
15  * <dd>Copyright &#169; 2002-2003 <a
16  * HREF="http://www.sapia-oss.org">Sapia Open Source Software </a>. All
17  * Rights Reserved.</dd>
18  * </dt>
19  * <dt><b>License: </b>
20  * <dd>Read the license.txt file of the jar or visit the <a
21  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the
22  * Sapia OSS web site</dd>
23  * </dt>
24  * </dl>
25  */

26 public interface Abortable {
27   /**
28    * This method is called prior to a task's execution; if <code>true</code>
29    * is returned, the task is not executed.
30    *
31    * @return <code>true</code> if the task should be discarded (not executed)
32    * by the task manager.
33    */

34   public boolean isAborted();
35 }
36
Popular Tags