Package org.globus.io.urlcopy

Examples of org.globus.io.urlcopy.UrlCopy


        if (executorService == null) {
            throw new IllegalArgumentException("executorService may not be null");
        }

        final UrlCopy urlcopy = new UrlCopy();

        try {
            final GlobusURL source = new GlobusURL(sourceUrlString);
            urlcopy.setSourceUrl(source);
        } catch (Exception e) {
            throw new ExecutionProblem("Problem constructing source URL: " +
                                                e.getMessage());
        }

        try {
            final GlobusURL dest = new GlobusURL(destUrlString);
            urlcopy.setDestinationUrl(dest);
        } catch (Exception e) {
            throw new ExecutionProblem("Problem constructing destination " +
                                       "URL: " + e.getMessage());
        }

        if (identityAuthorization == null) {
            urlcopy.setDestinationAuthorization(
                            HostAuthorization.getInstance());

            if (debug != null) {
                debug.println(
                        "Using host-based authorization of remote server");
            }
        } else {
            final IdentityAuthorization idA =
                    new IdentityAuthorization(identityAuthorization);
            urlcopy.setDestinationAuthorization(idA);
            if (debug != null) {
                debug.println("Using identity-based authorization of remote " +
                        "server: '" + identityAuthorization + "'");
            }
        }
View Full Code Here

TOP

Related Classes of org.globus.io.urlcopy.UrlCopy

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.