Package org.globus.workspace.common.print

Examples of org.globus.workspace.common.print.Print


       
        this.epr = null;
        this.stubConf = null;

        if (debug == null) {
            this.pr = new Print(); // convenience constructor for DISABLE mode
        } else {
            this.pr = debug;
        }
    }
View Full Code Here


                                 PrintStream infoStream,
                                 PrintStream errStream,
                                 PrintStream debugStream) {

        final PrintOpts printOpts = new PrintOpts(null);
        final Print print =
                new Print(printOpts, infoStream, errStream, debugStream);

        final WorkspaceCLI cli = new WorkspaceCLI(print);

        final int retCode = mainImpl(args, cli);

        print.flush();
        print.close();

        return retCode;
    }
View Full Code Here

            //throwable = t;
            any = t;
            retCode = BaseClient.UNKNOWN_EXIT_CODE;
        }

        final Print pr = cli.getPr();

        if (!pr.enabled()) {
            // the rest of this method is for printing
            return retCode; // *** EARLY RETURN ***
        }

        if (exitNow != null) {
            pr.debugln("[exiting via exitnow system]");
            pr.debugln(BaseClient.retCodeDebugStr(retCode));
            return retCode; // *** EARLY RETURN ***
        }

        if (any == null) {
            pr.debugln(BaseClient.retCodeDebugStr(retCode));
            return retCode; // *** EARLY RETURN ***
        }

        CommonPrint.printDebugSection(pr, "PROBLEM");

        final String message = CommonUtil.genericExceptionMessageWrapper(any);

        if (pr.useThis()) {

            String err = "\nProblem: " + message;

            if (parameterProblem != null && !pr.useLogging()) {
                err += "\nSee help (-h).";
            }

            pr.errln(PrCodes.ANY_ERROR_CATCH_ALL, err);

        } else if (pr.useLogging()) {

            final String err = "Problem: " + message;

            if (logger.isDebugEnabled()) {
                logger.error(err, any);
            } else {
                logger.error(err);
            }
        }

        pr.debugln("\n");

        final String sectionTitle = "STACKTRACE";
        CommonPrint.printDebugSection(pr, sectionTitle);

        any.printStackTrace(pr.getDebugProxy());

        CommonPrint.printDebugSectionEnd(pr, sectionTitle);

        pr.debugln("\n");

        pr.debugln("Stacktrace was from: " + any.getMessage());

        pr.debugln(BaseClient.retCodeDebugStr(retCode));

        return retCode;
    }
View Full Code Here

        print.infoln("Querying networks.");

        // don't mess with the main print system, make a new one
        final int[] printThese = {PrCodes.FACTORYRPQUERY__ASSOCS};
        final PrintOpts newOpts = new PrintOpts(printThese);
        final Print newprint = new Print(newOpts,
                                         print.getInfoProxy(),
                                         print.getErrProxy(),
                                         print.getDebugProxy());

        final FutureTask task =
View Full Code Here

                              throws ExecutionProblem {

        RepositoryInterface repoUtil;

        String repoType = args.getXferType();
        repoUtil = CloudClientUtil.getRepoUtil(repoType, args, new Print());

        if (imageName == null) {
            throw new IllegalArgumentException("imageName may not be null");
        }
View Full Code Here

               
                final String elem =
                   this.eitherCreate.getSettings().getGeneratedEprElementName();

                // suppress console prints of individual EPR writes if > 10
                final Print print;
                boolean suppressed = false;
                if (warray.length > 10) {
                    print = new Print();
                    suppressed = true;
                } else {
                    print = this.pr;
                }
               
View Full Code Here

        node.setIdentity(ids);
        Node_Type[] nodes = {node};

        AdjustTask task = new AdjustTask("1.2.3.4", null, "something");
        AdjustTask[] tasks = {task};
        Print pr = new Print(new PrintOpts(null), System.out, System.err, System.err);
        adjustKnownHosts(nodes, "/home/tim/known", null, tasks, pr);
    }
View Full Code Here

TOP

Related Classes of org.globus.workspace.common.print.Print

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.