package at.acdp.urweb.web; import at.acdp.urweb.Main; import com.nmote.xr.XRMethod; import java.util.concurrent.ExecutionException; public class XRServer { @XRMethod(value = "example.helloWorld", help = "Returns 'Helo ' + argument") public static String hello(Object s) { return "Hello '" + s + "'"; } @XRMethod(value = "ref", help = "ref") public static String ref(String a, String b) { return "ref"; } @XRMethod(value = "pos", help = "pos") public static void pos(String pos) { //Main.fhm.prepare(); Main.fhm.direktAuftrag(Integer.parseInt(pos),0); Main.fhm.direktAuftrag(Integer.parseInt(pos),1); } @XRMethod(value = "status", help = "Returns status") public static String status() { var x=Main.fhm.readStatus(); try { return x==null?"":x.get().toString(); } catch (Exception e) { e.printStackTrace(); return e.toString(); } } @XRMethod(value = "set_title", help = "Returns 'Helo ' + argument") public static String set_title(Object s) { return "Hello '" + s + "'"; } @XRMethod(value = "get_title", help = "Returns 'Helo ' + argument") public static String get_title() { return "Hello"; } @XRMethod(value = "get_message") public static String get_message(Object s) { return "asdfasdfas"; } }