Examples of SimpleDispatcher


Examples of org.apache.commons.scxml.env.SimpleDispatcher

        return getExecutor(ctx, evaluator, scxml, ed, trc);
    }

    public static SCXMLExecutor getExecutor(final SCXML scxml,
            final Context ctx, final Evaluator evaluator) {
        EventDispatcher ed = new SimpleDispatcher();
        Tracer trc = new Tracer();
        return getExecutor(ctx, evaluator, scxml, ed, trc);
    }
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

     */
    public void testInvoke01Sample() {
        try {
            SCXML scxml = SCXMLParser.parse(invoke01,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
            exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

    public void testInvoke02Sample() {
        try {
            SCXML scxml = SCXMLParser.parse(invoke02,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
            exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

    public void testInvoke03Sample() {
        try {
            SCXML scxml = SCXMLParser.parse(invoke03,
                new SimpleErrorHandler());
            exec = new SCXMLExecutor(new JexlEvaluator(), new SimpleDispatcher(),
                new SimpleErrorReporter());
            assertNotNull(exec);
            exec.setRootContext(new JexlContext());
            exec.setStateMachine(scxml);
            exec.registerInvokerClass("scxml", SimpleSCXMLInvoker.class);
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

          return null;
        }
       
        SCXMLExecutor exec = null;
        try {
            exec = new SCXMLExecutor(evaluator, new SimpleDispatcher(),
                new SimpleErrorReporter());
            scxml.addListener(new SimpleSCXMLListener());
            exec.setSuperStep(true);
            exec.setStateMachine(scxml);
        } catch (ModelException me) {
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

          return null;
        }
       
        SCXMLExecutor exec = null;
        try {
            exec = new SCXMLExecutor(evaluator, new SimpleDispatcher(),
                new SimpleErrorReporter());
            scxml.addListener(new SimpleSCXMLListener());
            exec.setSuperStep(true);
            exec.setStateMachine(scxml);
        } catch (ModelException me) {
View Full Code Here

Examples of org.apache.commons.scxml.env.SimpleDispatcher

        this.parentDialogId = parentDialogId;

        // Create a working instance of the state machine for this dialog, but do not
        // set it in motion
        this.executor = new SCXMLExecutor(new ShaleDialogELEvaluator(),
                        new SimpleDispatcher(), new SimpleErrorReporter());
        SCXML statemachine = dialog.getStateMachine();
        this.executor.setStateMachine(statemachine);
        Context rootCtx = new ShaleDialogELContext();
        rootCtx.setLocal(Globals.DIALOG_PROPERTIES, new DialogProperties());
        this.executor.setRootContext(rootCtx);
View Full Code Here

Examples of org.apache.commons.scxml2.env.SimpleDispatcher

     */
    protected SCXMLExecutionContext(SCXMLIOProcessor externalIOProcessor, Evaluator evaluator,
                                    EventDispatcher eventDispatcher, ErrorReporter errorReporter) {
        this.externalIOProcessor = externalIOProcessor;
        this.evaluator = evaluator;
        this.eventdispatcher = eventDispatcher != null ? eventDispatcher : new SimpleDispatcher();
        this.errorReporter = errorReporter != null ? errorReporter : new SimpleErrorReporter();
        this.notificationRegistry = new NotificationRegistry();

        this.scInstance = new SCInstance(this, this.evaluator, this.errorReporter);
        this.actionExecutionContext = new ActionExecutionContext(this);
View Full Code Here

Examples of org.apache.commons.scxml2.env.SimpleDispatcher

     * Set or replace the event dispatch
     *
     * @param eventdispatcher The event dispatcher to set, if null a SimpleDispatcher instance will be used instead
     */
    protected void setEventdispatcher(EventDispatcher eventdispatcher) {
        this.eventdispatcher = eventdispatcher != null ? eventdispatcher : new SimpleDispatcher();
    }
View Full Code Here

Examples of org.apache.commons.scxml2.env.SimpleDispatcher

        } catch (IOException ioe) {
            throw new InvokerException(ioe.getMessage(), ioe.getCause());
        } catch (XMLStreamException xse) {
            throw new InvokerException(xse.getMessage(), xse.getCause());
        }
        executor = new SCXMLExecutor(evaluator, new SimpleDispatcher(), new SimpleErrorReporter());
        Context rootCtx = evaluator.newContext(null);
        for (Map.Entry<String, Object> entry : params.entrySet()) {
            rootCtx.setLocal(entry.getKey(), entry.getValue());
        }
        executor.setRootContext(rootCtx);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.