2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shale.dialog;
19
20
21 /***
22 * <p>JavaBeans listener for a single instance of a Shale dialog.</p>
23 *
24 * <p><strong>IMPLEMENTATION NOTE</strong> - Implementations of this interface
25 * will be stored in session scope, so they should be serializable.</p>
26 *
27 * @since 1.0.4
28 */
29 public interface DialogContextListener {
30
31
32
33
34 /***
35 * <p>Handle the starting of the dialog instance.</p>
36 */
37 public void onStart();
38
39
40 /***
41 * <p>Handle the stopping of the dialog instance.</p>
42 */
43 public void onStop();
44
45
46 /***
47 * <p>Handle an unexpected failure during the execution of this dialg
48 * instance.</p>
49 *
50 * @param exception A potentially implementation specific exception
51 * during the execution of this dialog instance
52 */
53 public void onException(Exception exception);
54
55
56
57
58 /***
59 * <p>Handle an entry into a dialog state.</p>
60 *
61 * @param stateId Implementation specific identifier of the state
62 * that has been entered
63 */
64 public void onEntry(String stateId);
65
66
67 /***
68 * <p>Handle an exit from a dialog state.</p>
69 *
70 * @param stateId Implementation specific identifier of the state
71 * that has been exited
72 */
73 public void onExit(String stateId);
74
75
76 /***
77 * <p>Handle a transition being followed.</p>
78 *
79 * @param fromStateId Implementation specific identifier of the source
80 * state for the transition that has been followed
81 * @param toStateId Implementation specific identifier of the target
82 * state for the transition that has been followed
83 */
84 public void onTransition(String fromStateId, String toStateId);
85
86
87
88
89 /***
90 * <p>Return the {@link DialogContext} instance associated with this
91 * {@link DialogContextListener}.</p>
92 *
93 * @return The {@link DialogContext} whose execution we are listening to
94 */
95 public DialogContext getDialogContext();
96
97
98 /***
99 * <p>Set the {@link DialogContext} instance associated with this
100 * {@link DialogContextListener}.</p>
101 *
102 * @param dialogContext The {@link DialogContext} whose execution we
103 * will track
104 */
105 public void setDialogContext(DialogContext dialogContext);
106
107
108 }