Package org.globus.workspace.common.print

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


        BrokerContactType broker = new BrokerContactType();

        final RunTask[] runTasks = deployment.generateRunTasks(broker,
            this.getTempDir().getAbsolutePath(),
            "/home/david/.ssh/id_rsa.pub",
            60, new Print());

        assertEquals(deployment.getMembers().size(),  runTasks.length);

    }
View Full Code Here


   
    private MemberDeployment[] getMemberDeployments() throws Exception {
        final Cloudcluster_Type cluster = TestUtil.getSampleCluster();

        final ClusterMember[] members =
            ClusterUtil.getClusterMembers(cluster, "priv", "pub", new Print());

        final MemberDeployment[] deploys = new MemberDeployment[members.length];
        for (int i = 0; i < deploys.length; i++) {
            deploys[i] = new MemberDeployment(members[i], new Clouddeploy_Type());
        }
View Full Code Here

    GlobusCredential getCredentialBeingUsed() throws Exception {
        if (this.credentialUsed != null) {
            return this.credentialUsed;
        }
        this.credentialUsed = CloudClientUtil.getActiveX509Credential(new Print());
        if (this.credentialUsed == null) {
            throw new Exception("Could not find current credential");
        }
        return this.credentialUsed;
    }
View Full Code Here

        return this.remoteUserBaseDir;
    }

    private URI deriveImageURL(String imageName) throws ExecutionProblem {

        AllArgs args = new AllArgs(new Print());
        try {
            args.intakeProperties(this.props, "from meta", null);
        } catch (Exception e) {
            throw new ExecutionProblem(e.getMessage(), e);
        }
View Full Code Here

            debug = System.err;
        }

        PrintOpts prOpts = new PrintOpts(CloudClient.getOptInPrCodes());

        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;
            parameterProblem = e;
        } catch (ExecutionProblem e) {
            anyError = e;
        } catch (ExitNow e) {
            exitNow = e;
        } catch (Throwable e) {
            anyError = e;
        }

        int exitCode;

        if (exitNow != null) {
            print.debugln("[exiting via exitnow system]");
            exitCode = exitNow.exitCode;

        } else if (anyError == null) {
            exitCode = BaseClient.SUCCESS_EXIT_CODE;
        } else {
            exitCode = BaseClient.COMMAND_LINE_EXIT_CODE;

            final String message =
                CommonUtil.genericExceptionMessageWrapper(anyError);

            String err = "Problem: " + message;

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

            print.errln(err);

            print.debugln("\n");

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

            anyError.printStackTrace(print.getDebugProxy());

            CommonPrint.printDebugSectionEnd(print, sectionTitle);

            print.debugln("\n");

            print.debugln("Stacktrace was from: " + anyError.getMessage());
        }

        print.flush();
        print.close();
        System.exit(exitCode);
    }
View Full Code Here

        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

                    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

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

        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

        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

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.