} catch (UnknownHostException | CadiException e1) {
throw new LocatorException(e1);
}
+ URI aaf_locator_uri;
try {
aaf_locator_host = rph.replacements(getClass().getSimpleName(),"https://"+Config.AAF_LOCATE_URL_TAG,null,null);
if(aaf_locator_host.endsWith("/locate")) {
} else {
aaf_locator_uri = new URI(aaf_locator_host+"/locate");
}
-
access.printf(Level.INFO, "AbsAAFLocator AAF URI is %s",aaf_locator_uri);
} catch (URISyntaxException e) {
throw new LocatorException(e);
this.name = split[0];
this.version = (split.length > 1) ? split[1] : access.getProperty(Config.AAF_API_VERSION,Config.AAF_DEFAULT_API_VERSION);
}
-
}
-
+
/**
* This is the way to setup specialized AAFLocators ahead of time.
* @param preload
@Override
public Item best() throws LocatorException {
if (!hasItems()) {
- throw new LocatorException("No Entries found for '" + aaf_locator_uri.toString() + '/' + name + ':' + version + '\'');
+ throw new LocatorException(String.format("No Entries found for '%s/%s:%s'",
+ (aaf_locator_uri==null?aaf_locator_host:aaf_locator_uri.toString()),
+ name,
+ version));
}
List<EP> lep = new ArrayList<>();
EP first = null;
}
return null;
}
-
+
protected static class AAFLItem implements Item {
private Iterator<EP> iter;
private URI uri;