Package com.cloudbees.groovy.cps

Examples of com.cloudbees.groovy.cps.Continuable


        // catch an exception thrown from body and treat that as a failure
        TryBlockEnv env = new TryBlockEnv(caller, null);
        env.addHandler(Throwable.class, new FailureAdapter(bodyExecution,sn));

        return new Continuable(
            // this source location is a place holder for the step implementation.
            // perhaps at some point in the future we'll let the Step implementation control this.
            inv.invoke(env, SourceLocation.UNKNOWN, new SuccessAdapter(bodyExecution,sn)));
    }
View Full Code Here


        final CpsThreadGroup g = new CpsThreadGroup(this);
        final SettableFuture<CpsThreadGroup> f = SettableFuture.create();
        g.runner.submit(new Runnable() {
            @Override
            public void run() {
                CpsThread t = g.addThread(new Continuable(s,createInitialEnv()),h,null);
                t.resume(new Outcome(null, null));
                f.set(g);
            }

            /**
 
View Full Code Here

        promise.set(g);
        runInCpsVmThread(new FutureCallback<CpsThreadGroup>() {
            @Override public void onSuccess(CpsThreadGroup g) {
                CpsThread t = g.addThread(
                        new Continuable(new ThrowBlock(new ConstantBlock(
                            new IOException("Failed to load persisted workflow state", problem)))),
                        head_, null
                );
                t.resume(new Outcome(null,null));
            }
View Full Code Here

TOP

Related Classes of com.cloudbees.groovy.cps.Continuable

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.