1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.scxml.test;
18
19 import org.apache.commons.scxml.Evaluator;
20 import org.apache.commons.scxml.env.jsp.ELEvaluator;
21
22 /***
23 * Standalone SCXML interpreter, useful for command-line testing and
24 * debugging, where expressions are JSP 2.0 EL expressions.
25 *
26 * <p>USAGE:</p>
27 * <p><code>java org.apache.commons.scxml.test.StandaloneElExpressions
28 * url</code></p>
29 * <p>or</p>
30 * <p><code>java org.apache.commons.scxml.test.StandaloneElExpressions
31 * filename</code>
32 * </p>
33 *
34 * <p>RUNNING:</p>
35 * <ul>
36 * <li>Enter a space-separated list of "events"</li>
37 * <li>To quit, enter "quit"</li>
38 * <li>To populate a variable in the current context,
39 * type "name=value"</li>
40 * <li>To reset state machine, enter "reset"</li>
41 * </ul>
42 *
43 */
44 public final class StandaloneElExpressions {
45
46 /***
47 * Launcher.
48 * @param args The arguments, one expected, the URI or filename of the
49 * SCXML document
50 */
51 public static void main(final String[] args) {
52 if (args.length < 1) {
53 System.out.println("USAGE: java "
54 + StandaloneElExpressions.class.getName()
55 + "<url|filename>");
56 System.exit(-1);
57 }
58 Evaluator evaluator = new ELEvaluator();
59 StandaloneUtils.execute(args[0], evaluator);
60 }
61
62 /***
63 * Discourage instantiation since this is a utility class.
64 */
65 private StandaloneElExpressions() {
66 super();
67 }
68
69 }
70