KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > state > TestErrFlow


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

12 public class TestErrFlow implements State {
13   private String JavaDoc _id;
14   private boolean _handle;
15
16   public TestErrFlow(String JavaDoc id, boolean handle) {
17     _id = id;
18     _handle = handle;
19   }
20
21   public String JavaDoc getId() {
22     return _id;
23   }
24
25   public void execute(Result st) {
26     st.error("error !!!");
27
28     if (_handle) {
29       st.handleError();
30     }
31   }
32 }
33
Popular Tags