+ @Override
+ public URI toBackendUri(String url) {
+ try {
+ URI u = new URI(url);
+ if (u.getHost() == null) {
+ // TODO make it more robust
+ u = new URI(httpServerBase + url);
+ }
+ return u;
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException("Cannot convert " + url, e);
+ }
+ }
+
+ public void setHttpServerBase(String httpServerBase) {
+ this.httpServerBase = httpServerBase;
+ }
+