Examples of Print


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

        PrintStream debug = null;
        if (CLIUtils.containsDebug(argv)) {
            debug = System.err;
        }
        final PrintOpts pOpts = new PrintOpts(getOptInPrCodes());
        final Print print = new Print(pOpts, System.out, System.err, debug);
        final int retCode = mainImpl(argv, print);
        print.flush();
        print.close();
        System.exit(retCode);
    }
View Full Code Here

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

                    final PrintOpts opts = new PrintOpts(null);
                    PrintStream debug = null;
                    if (client.isDebugMode()) {
                        debug = System.err;
                    }
                    final Print pr =
                            new Print(opts, System.out, System.err, debug);
                    final Status_QueryAll queryAll =
                            new Status_QueryAll(statusPort, pr);
                    Workspace[] workspaces = queryAll.queryAll();
                    printCurrent(workspaces, pr);
                } catch (Exception e) {
View Full Code Here

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

    /**
     * @param print may be null (will be disabled)
     */
    public GenericListener(Print print) {
        if (print == null) {
            this.pr = new Print();
        } else {
            this.pr = print;
        }
    }
View Full Code Here

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

        if (ctx == null) {
            return iface; // *** EARLY RETURN ***
        }

        final Print pr;
        if (print == null) {
            pr = new Print();
        } else {
            pr = print;
        }

        final Provides_Type provides = ctx.getProvides();

        if (provides == null) {
            throw new ParameterProblem("no provides element?");
        }

        final IdentityProvides_Type[] idents = provides.getIdentity();
        if (idents == null || idents.length == 0) {
            final IdentityProvides_Type ident = new IdentityProvides_Type();
            ident.set_interface(iface);
            final IdentityProvides_Type[] newidents = {ident};
            provides.setIdentity(newidents);

            pr.debugln(memberName + ": found no provides identities, created " +
                    "new, empty one with iface '" + iface + "'");

            return iface; // *** EARLY RETURN ***
        }

        if (idents.length > 1) {
            throw new ParameterProblem(memberName + ": found multiple " +
                    "identities in context 'provides' section, but " +
                    "only one NIC is defined in the cluster definition");
        }

        final String ctxIface = idents[0].get_interface();

        if (ctxIface != null) {
            pr.debugln(memberName + ": found interface name " +
                       "in the identity in context 'provides' section, but " +
                        "there is an explicit name for it -- ClusterMemberNic " +
                        "will now match this ('" + ctxIface + "')");
            return ctxIface;
        } else {
View Full Code Here

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

        this.stubConf = stubConfigurator;

        this.portType = null;

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

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

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

                                 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

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

            //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

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

        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

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

                              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
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.