Package org.globus.workspace.client_core

Examples of org.globus.workspace.client_core.ExitNow


        final Print print = new Print(prOpts, System.out, System.err, debug);
        CloudMetaClient client = new CloudMetaClient(print);

        ParameterProblem parameterProblem = null;
        ExitNow exitNow = null;
        Throwable anyError = null;
        try {
            mainImpl(client, argv);
        } catch (ParameterProblem e) {
            anyError = e;
View Full Code Here


        final CloudClient client = new CloudClient(pr);

        // used:
        ParameterProblem parameterProblem = null;
        ExitNow exitNow = null;
        Throwable any = null;

        // unused currently:
        //Throwable throwable = null;
        //ExecutionProblem executionProblem = null;
View Full Code Here

                    this.pr.errln(PrCodes.CTXPRINTSTATUS__ONE_ERROR, msg);
                } else if (this.pr.useLogging()) {
                    logger.error(msg);
                }
            }
            throw new ExitNow(BaseClient.APPLICATION_EXIT_CODE);
        }

        final Node_Type[] nodes = this.queryContextBroker();

        final List<IpAndStatus> results = this.analyze(knownIps, nodes);

        // if all are OK, it exits normally
        boolean notAllOK = false;

        String longestString = "";
        for (IpAndStatus result : results) {
            if (longestString.length() < result.ip.length()) {
                longestString = result.ip;
            }
        }
        final int longestStringLen = longestString.length();

        for (IpAndStatus result : results) {

            if (!result.status.equals(CTX_SUCCESS)) {
                notAllOK = true;
            }

            if (this.pr.enabled()) {

                final StringBuilder printIp = new StringBuilder(result.ip);
                while (printIp.length() < longestStringLen) {
                    printIp.append(' ');
                }
                printIp.append("    ").append(result.status);
               
                if (this.pr.useThis()) {
                    this.pr.infoln(PrCodes.CTXPRINTSTATUS__ONE_IP, printIp.toString());
                } else if (this.pr.useLogging()) {
                    logger.info(printIp.toString());
                }
            }
        }

        if (notAllOK) {
            throw new ExitNow(BaseClient.CTX_PENDING_RESULTS);
        }
    }
View Full Code Here

                    this.pr.errln(errMsg);
                } else if (this.pr.useLogging()) {
                    logger.error(errMsg);
                }
            }
            throw new ExitNow(1);
        }
        return nodes;
    }
View Full Code Here

                        this.pr.errln(PrCodes.CTXPRINTSTATUS__ONE_ERROR, msg);
                    } else if (this.pr.useLogging()) {
                        logger.error(msg);
                    }
                }
                throw new ExitNow(BaseClient.APPLICATION_EXIT_CODE);
            }
            knownIps.add(parts[1]);
            final String dbg = "Found locally known node ip " + parts[1];
            if (this.pr.useThis()) {
                this.pr.dbg(dbg);
View Full Code Here

        if (this.args.reportDir != null) {
            this.writeReports(result);
        }

        if (!result.allAtState) {
            throw new ExitNow(1);
        }
    }
View Full Code Here

            } else if (this.pr.useLogging()) {
                logger.error(err);
            }
        }

        throw new ExitNow(BaseClient.APPLICATION_EXIT_CODE);
    }
View Full Code Here

    private static int mainImpl(String[] args,
                                WorkspaceCLI cli) {

        // used:
        ParameterProblem parameterProblem = null;
        ExitNow exitNow = null;
        Throwable any = null;

        // unused currently:
        //Throwable throwable = null;
        //ExecutionProblem executionProblem = null;
View Full Code Here

        this.executor.submit(task);

        try {
            final Integer retCode = (Integer) task.get();
            if (retCode.intValue() != BaseClient.SUCCESS_EXIT_CODE) {
                throw new ExitNow(retCode.intValue());
            }
        } catch (InterruptedException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } catch (ExecutionException e) {
            throw new ExecutionProblem(e.getMessage(), e);
View Full Code Here

        this.executor.submit(task);

        try {
            final Integer retCode = (Integer) task.get();
            if (retCode.intValue() != BaseClient.SUCCESS_EXIT_CODE) {
                throw new ExitNow(retCode.intValue());
            }
        } catch (InterruptedException e) {
            throw new ExecutionProblem(e.getMessage(), e);
        } catch (ExecutionException e) {
            throw new ExecutionProblem(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.globus.workspace.client_core.ExitNow

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.