KickJava   Java API By Example, From Geeks To Geeks.

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


1 package org.sapia.soto.state;
2
3
4 /**
5  * Specifies the behavior of listeners that are notified upon execution of flows.
6  *
7  * @see StateMachine#addStateExecListener(StateExecListener)
8  *
9  * @author Yanick Duchesne
10  * <dl>
11  * <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>
12  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
13  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public interface StateExecListener {
17   /**
18    * Called before a flow is executed.
19    *
20    * @param st the <code>State</code> corresponding to the execution.
21    * @param flowId the ID of the executed flow.
22    */

23   public void onPreExec(Result st, String JavaDoc flowId);
24
25   /**
26    * Called after a flow is executed.
27    *
28    * @param st the <code>State</code> corresponding to the execution.
29    * @param flowId the ID of the executed flow.
30    */

31   public void onPostExec(Result st, String JavaDoc flowId);
32
33   /**
34    * Called after a flow's execution, if an error has occurred.
35    *
36    * @param st the <code>State</code> corresponding to the execution.
37    * @param flowId the ID of the executed flow.
38    * @param err the <code>Err</code> object that encapsulates error data.
39    *
40    * @see Result#isError()
41    */

42   public void onError(Result st, String JavaDoc flowId, Err err);
43 }
44
Popular Tags