Package com.asakusafw.windgate.core

Examples of com.asakusafw.windgate.core.GateTask


                end - start);
        System.exit(status);
    }

    static int execute(String[] args) {
        GateTask task;
        try {
            Configuration conf = parseConfiguration(args);
            task = new GateTask(
                    conf.profile,
                    conf.script,
                    conf.sessionId,
                    conf.mode.createsSession,
                    conf.mode.completesSession,
                    conf.arguments);
        } catch (Exception e) {
            HelpFormatter formatter = new HelpFormatter();
            formatter.setWidth(Integer.MAX_VALUE);
            formatter.printHelp(
                    MessageFormat.format(
                            "java -classpath ... {0}",
                            WindGate.class.getName()),
                    OPTIONS,
                    true);
            System.out.println("Note:");
            System.out.println("  Profile and script path accept following URI formats:");
            System.out.println("    no scheme -");
            System.out.println("      Local file system path");
            System.out.println("    \"classpath\" scheme -");
            System.out.println("      Absolute path on class path (includes plugin libraries)");
            System.out.println("    other schemes (e.g. http://...)-");
            System.out.println("      Processed as a URL");
            WGLOG.error(e, "E00001");
            return 1;
        }
        try {
            if (RuntimeContext.get().canExecute(task)) {
                task.execute();
            }
            return 0;
        } catch (Exception e) {
            WGLOG.error(e, "E00002");
            return 1;
        } finally {
            task.close();
        }
    }
View Full Code Here


    protected void execute0(
            TestDriverContext context,
            ClassLoader classLoader,
            GateProfile profile,
            TestExecutionPlan.Command command) throws IOException, InterruptedException {
        GateTask task = createTask(context, classLoader, profile, command);
        try {
            task.execute();
        } finally {
            task.close();
        }
    }
View Full Code Here

        List<String> cmd = command.getCommandTokens();
        GateScript script = loadScript(context, classLoader, cmd.get(ARG_SCRIPT));
        String sessionId = context.getExecutionId();
        ExecutionKind mode = ExecutionKind.parse(cmd.get(ARG_SESSION_KIND));
        String arguments = cmd.get(ARG_ARGUMENTS);
        GateTask task = new GateTask(
                profile,
                script,
                sessionId,
                mode.createsSession,
                mode.completesSession,
View Full Code Here

TOP

Related Classes of com.asakusafw.windgate.core.GateTask

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.