KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.taskman;
2
3 /**
4  * A instance of this class is used be <code>Task</code> to log their
5  * activity.
6  * <p>
7  * It is left to implementation to handle the logging method calls in a manner
8  * consistent with the "debug level" their name suggests.
9  *
10  *
11  * @author Yanick Duchesne 15-Apr-2003
12  * <dl>
13  * <dt><b>Copyright: </b>
14  * <dd>Copyright &#169; 2002-2004 <a
15  * HREF="http://www.sapia-oss.org">Sapia Open Source Software </a>. All
16  * Rights Reserved.</dd>
17  * </dt>
18  * <dt><b>License: </b>
19  * <dd>Read the license.txt file of the jar or visit the <a
20  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the
21  * Sapia OSS web site</dd>
22  * </dt>
23  * </dl>
24  */

25 public interface TaskOutput {
26   /**
27    * Sets the name of the task to which this instance corresponds, allowing
28    * implementations to display which task is currently generating output.
29    *
30    * @param name
31    * a task name.
32    */

33   public void setTaskName(String JavaDoc name);
34
35   /**
36    * Outputs a message of "debug" priority.
37    *
38    * @param message
39    * a message, as an <code>Object</code>.
40    */

41   public TaskOutput debug(Object JavaDoc message);
42
43   /**
44    * Outputs a message of "info" priority.
45    *
46    * @param message
47    * a message, as an <code>Object</code>.
48    */

49   public TaskOutput info(Object JavaDoc message);
50
51   /**
52    * Outputs a message of "warning" priority.
53    *
54    * @param message
55    * a message, as an <code>Object</code>.
56    */

57   public TaskOutput warning(Object JavaDoc message);
58
59   /**
60    * Outputs a message of "error" priority.
61    *
62    * @param message
63    * a message, as an <code>Object</code>.
64    */

65   public TaskOutput error(Object JavaDoc message);
66
67   /**
68    * Outputs a message of "error" priority.
69    *
70    * @param err
71    * a <code>Throwable</code>.
72    */

73   public TaskOutput error(Throwable JavaDoc err);
74
75   /**
76    * Outputs a message of "error" priority.
77    *
78    * @param message
79    * a message, as an <code>Object</code>.
80    * @param err
81    * a <code>Throwable</code>.
82    */

83   public TaskOutput error(Object JavaDoc message, Throwable JavaDoc err);
84
85   /**
86    * Closes this instance; allows for implementations to cleanup their
87    * resources.
88    */

89   public void close();
90 }
91
Popular Tags