summaryrefslogtreecommitdiffstats
path: root/test/bindings/java/org/uscxml/examples/MonitorExample.java
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-11-28 17:03:31 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-11-28 17:03:31 (GMT)
commita6313d4ab2005196f376870c9ca945c691948416 (patch)
tree5345422d235e7c511885601854b6a2923db09e2e /test/bindings/java/org/uscxml/examples/MonitorExample.java
parentfcfc842a1ccee7a6b2579889f3236d50849c0679 (diff)
downloaduscxml-a6313d4ab2005196f376870c9ca945c691948416.zip
uscxml-a6313d4ab2005196f376870c9ca945c691948416.tar.gz
uscxml-a6313d4ab2005196f376870c9ca945c691948416.tar.bz2
Refactored Java into bindings and generated
Diffstat (limited to 'test/bindings/java/org/uscxml/examples/MonitorExample.java')
-rw-r--r--test/bindings/java/org/uscxml/examples/MonitorExample.java55
1 files changed, 0 insertions, 55 deletions
diff --git a/test/bindings/java/org/uscxml/examples/MonitorExample.java b/test/bindings/java/org/uscxml/examples/MonitorExample.java
deleted file mode 100644
index dc4cffa..0000000
--- a/test/bindings/java/org/uscxml/examples/MonitorExample.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.uscxml.examples;
-
-import org.uscxml.Interpreter;
-import org.uscxml.InterpreterException;
-import org.uscxml.InterpreterState;
-import org.uscxml.StringVector;
-import org.uscxml.helper.TestMonitor;
-
-
-public class MonitorExample {
-
- public static void main(String[] args) {
-
- String uSCXMLLibPath = "/Users/sradomski/Documents/TK/Code/uscxml/build/cli/lib/libuscxmlNativeJava.jnilib";
- if (System.getenv().containsKey("USCXML_JAVA_LIB")) {
- uSCXMLLibPath = System.getenv("USCXML_JAVA_LIB");
- }
-
- System.load(uSCXMLLibPath);
-
- try {
- TestMonitor tm = new TestMonitor();
- Interpreter scxml = Interpreter.fromURL("https://raw.githubusercontent.com/tklab-tud/uscxml/master/test/w3c/null/test436.scxml");
- scxml.addMonitor(tm);
- InterpreterState state = InterpreterState.USCXML_UNDEF;
- while((state = scxml.step()) != InterpreterState.USCXML_FINISHED) {
- switch (state) {
- case USCXML_FINISHED:
- case USCXML_UNDEF:
- case USCXML_IDLE:
- case USCXML_INITIALIZED:
- case USCXML_INSTANTIATED:
- break;
- case USCXML_MICROSTEPPED:
- case USCXML_MACROSTEPPED:
- StringVector states = scxml.getConfiguration();
- for (int i = 0; i < states.size(); i++) {
- System.out.print(states.get(i) + " ");
- }
- System.out.println();
- case USCXML_CANCELLED:
- break;
- default:
- break;
- }
- }
-
- } catch (InterpreterException e) {
- e.printStackTrace();
- System.exit(-1);
- }
- System.exit(0);
- }
-
-}