KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.taskman;
2
3 import org.sapia.taskman.transaction.TransactionListener;
4
5 /**
6  * @author Yanick Duchesne
7  *
8  * <dl>
9  * <dt><b>Copyright: </b>
10  * <dd>Copyright &#169; 2002-2004 <a HREF="http://www.sapia-oss.org">Sapia Open
11  * Source Software </a>. All Rights Reserved.</dd>
12  * </dt>
13  * <dt><b>License: </b>
14  * <dd>Read the license.txt file of the jar or visit the <a
15  * HREF="http://www.sapia-oss.org/license.html">license page </a> at the Sapia
16  * OSS web site</dd>
17  * </dt>
18  * </dl>
19  */

20 public class TestTransactionListener implements TransactionListener {
21   boolean begin;
22   boolean completed;
23   boolean success;
24   boolean error;
25
26   /**
27    * @see org.sapia.taskman.transaction.TransactionListener#onBegin()
28    */

29   public void onBegin() {
30     begin = true;
31   }
32
33   /**
34    * @see org.sapia.taskman.transaction.TransactionListener#onCommitted(boolean)
35    */

36   public void onCommitted(boolean success) {
37     completed = true;
38     this.success = success;
39   }
40
41   /**
42    * @see org.sapia.taskman.transaction.TransactionListener#onError(java.lang.Object)
43    */

44   public void onError(Object JavaDoc msg) {
45     error = true;
46   }
47
48   /**
49    * @see org.sapia.taskman.transaction.TransactionListener#onError(java.lang.Object,
50    * java.lang.Throwable)
51    */

52   public void onError(Object JavaDoc msg, Throwable JavaDoc t) {
53     error = true;
54   }
55
56   /**
57    * @see org.sapia.taskman.transaction.TransactionListener#onError(java.lang.Throwable)
58    */

59   public void onError(Throwable JavaDoc t) {
60     error = true;
61   }
62 }
63
Popular Tags