Examples of Next


Examples of com.cloudbees.groovy.cps.Next

    public ThrowBlock(Block exp) {
        this.exp = exp;
    }

    public Next eval(final Env e, Continuation _) {
        return new Next(exp,e,new Continuation() {
            public Next receive(Object t) {
                if (t==null) {
                    t = new NullPointerException();
                }
                if (!(t instanceof Throwable)) {
View Full Code Here

Examples of com.cloudbees.groovy.cps.Next

    /**
     * Creates a brand-new thread that evaluates 'b'.
     */
    GreenThreadState(GreenThread g, Block b) {
        // TODO: allow the caller to pass a value
        this(g,new Next(b, new FunctionCallEnv(null, null, null, HALT), HALT));
    }
View Full Code Here

Examples of com.cloudbees.groovy.cps.Next

    /**
     * Creates a {@link GreenThreadState} that's already dead.
     */
    GreenThreadState(GreenThread g, Outcome v) {
        this(g,new Next(null,HALT,v));
    }
View Full Code Here

Examples of com.cloudbees.groovy.cps.Next

        public Next body(Object _) {
            if (index==cases.size()) {
                // that was the last block
                return k.receive(null);
            } else {
                Next n = then(getCase().body, caseEnv, body);
                index++;
                return n;
            }
        }
View Full Code Here

Examples of com.cloudbees.groovy.cps.Next

        assignArguments(args, e);

        // TODO: who handles 'it' ?

        return new Next(body, e, k);
    }
View Full Code Here

Examples of org.jberet.job.Next

    private void resolveTransitionElements(List<?> transitions) {
        String oldVal, newVal;
        for (Object e : transitions) {
            if (e instanceof Next) {
                Next next = (Next) e;
                oldVal = next.getTo();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    next.setTo(newVal);
                }
                oldVal = next.getOn();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    next.setOn(newVal);
                }
            } else if (e instanceof Fail) {
                Fail fail = (Fail) e;
                oldVal = fail.getOn();
                newVal = resolve(oldVal);
View Full Code Here

Examples of org.jberet.job.Next

     */
    protected String resolveTransitionElements(List<?> transitionElements, String nextAttr, boolean partOfDecision) {
        String exitStatus = batchContext.getExitStatus();
        for (Object e : transitionElements) {  //end, fail. next, stop
            if (e instanceof Next) {
                Next next = (Next) e;
                if (matches(exitStatus, next.getOn())) {
                    return next.getTo();
                }
            } else if (e instanceof End) {
                End end = (End) e;
                if (matches(exitStatus, end.getOn())) {
                    setOuterContextStatus(batchContext.getOuterContexts(), BatchStatus.COMPLETED,
View Full Code Here

Examples of org.jberet.job.model.Transition.Next

    private void resolveTransitionElements(final List<?> transitions) {
        String oldVal, newVal;
        for (final Object e : transitions) {
            if (e instanceof Next) {
                final Next next = (Next) e;
                oldVal = next.getTo();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    next.setTo(newVal);
                }
                oldVal = next.getOn();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    next.setOn(newVal);
                }
            } else if (e instanceof Fail) {
                final Fail fail = (Fail) e;
                oldVal = fail.getOn();
                newVal = resolve(oldVal);
View Full Code Here

Examples of org.jberet.job.model.Transition.Next

     */
    protected String resolveTransitionElements(final List<?> transitionElements, final String nextAttr, final boolean partOfDecision) {
        final String exitStatus = batchContext.getExitStatus();
        for (final Object e : transitionElements) {  //end, fail. next, stop
            if (e instanceof Next) {
                final Next next = (Next) e;
                if (matches(exitStatus, next.getOn())) {
                    return next.getTo();
                }
            } else if (e instanceof End) {
                final End end = (End) e;
                if (matches(exitStatus, end.getOn())) {
                    setOuterContextStatus(batchContext.getOuterContexts(), BatchStatus.COMPLETED,
View Full Code Here

Examples of org.jberet.job.model.Transition.Next

     */
    protected String resolveTransitionElements(final List<?> transitionElements, final String nextAttr, final boolean partOfDecision) {
        final String exitStatus = batchContext.getExitStatus();
        for (final Object e : transitionElements) {  //end, fail. next, stop
            if (e instanceof Next) {
                final Next next = (Next) e;
                if (matches(exitStatus, next.getOn())) {
                    return next.getTo();
                }
            } else if (e instanceof End) {
                final End end = (End) e;
                if (matches(exitStatus, end.getOn())) {
                    final AbstractContext[] outerContexts = batchContext.getOuterContexts();
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.