1
2
3
4
5 package com.tomgibara.pronto.state;
6
7 /**
8 * Implementations of this interface may be used to control some aspects of
9 * state engine operation.
10 *
11 * @author Tom Gibara
12 *
13 */
14
15 public interface StateEnginePolicy {
16
17 /**
18 * Specifies whether exceptions raised by listeners, in response to state
19 * events, are logged by the implementation.
20 *
21 * @return whether exceptions thrown by listeners should be logged
22 */
23
24 boolean isListenerExceptionLogged();
25
26 /**
27 * Specifies whether exceptions raised by listeners, in response to state
28 * events, are thrown on a call to <code>setState</code> or
29 * <code>transition</code>. The throwing of such exceptions may prevent
30 * some listeners from receiving event notification but is guaranteed not
31 * interfere with the success of the transition.
32 *
33 * @return whether exceptions thrown by listeners remain uncaught by the
34 * engine
35 */
36
37 boolean isListenerExceptionThrown();
38
39 }