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 + "'");
}
}