Package org.apache.mina.statemachine.transition

Examples of org.apache.mina.statemachine.transition.MethodTransition


    }
   
    public void testExecuteNoArgsMethodOnArgsEvent() throws Exception {
        target.noArgs();
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "noArgs", target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here


        assertTrue(t.execute(argsEvent));
    }
   
    public void testExecuteExactArgsMethodOnNoArgsEvent() throws Exception {
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "exactArgs", target);
        assertFalse(t.execute(noArgsEvent));
    }
View Full Code Here

   
    public void testExecuteExactArgsMethodOnArgsEvent() throws Exception {
        target.exactArgs((A) args[0], (B) args[1], (C) args[2],
                         ((Integer) args[3]).intValue(), ((Boolean) args[4]).booleanValue());
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "exactArgs", target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here

        assertTrue(t.execute(argsEvent));
    }
   
    public void testExecuteSubsetExactArgsMethodOnNoArgsEvent() throws Exception {
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "subsetExactArgs", target);
        assertFalse(t.execute(noArgsEvent));
    }
View Full Code Here

    }
   
    public void testExecuteSubsetExactArgsMethodOnArgsEvent() throws Exception {
        target.subsetExactArgs((A) args[0], (A) args[1], ((Integer) args[3]).intValue());
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "subsetExactArgs", target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here

   
    public void testExecuteAllArgsMethodOnArgsEvent() throws Exception {
        target.allArgs(argsEvent, context, (A) args[0], (B) args[1], (C) args[2],
                ((Integer) args[3]).intValue(), ((Boolean) args[4]).booleanValue());
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, "allArgs", target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here

    }
   
    public void testExecuteSubsetAllArgsMethod1OnArgsEvent() throws Exception {
        target.subsetAllArgs(context, (B) args[1], (A) args[2], ((Integer) args[3]).intValue());
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, subsetAllArgsMethod1, target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here

    }
   
    public void testExecuteSubsetAllArgsMethod2OnArgsEvent() throws Exception {
        target.subsetAllArgs(argsEvent, (B) args[1], (B) args[2], ((Boolean) args[4]).booleanValue());
        startVerification();
        MethodTransition t = new MethodTransition("event", nextState, subsetAllArgsMethod2, target);
        assertTrue(t.execute(argsEvent));
    }
View Full Code Here

                            throw new StateMachineCreationException("Error encountered "
                                    + "when processing method "
                                    + m + ". Unknown state: " + in + ".");
                        }

                        state.addTransition(new MethodTransition(event, next, m, handler), annotation.weight());
                    }
                }
            }
        }
    }
View Full Code Here

        State s1 = new State("s1");
        State s2 = new State("s2");
        State s3 = new State("s3");

        s1.addTransition(new MethodTransition("call1", s2, handler));
        s2.addTransition(new MethodTransition("call2", s3, handler));
        s3.addTransition(new MethodTransition("call3", handler));

        StateMachine sm = new StateMachine(new State[] { s1, s2, s3 }, "s1");
        Reentrant reentrant = new StateMachineProxyBuilder().create(Reentrant.class, sm);
        reentrant.call1(reentrant);
        assertTrue(handler.finished);
View Full Code Here

TOP

Related Classes of org.apache.mina.statemachine.transition.MethodTransition

Copyright © 2018 www.massapicom. 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.