Thanks, that works.
Do you want me to raise an issue for this?
For reference for anybody else wanting to do this, my code is:
public class RackspaceServicenetModule extends AbstractModule {
@Override
protected void configure() {
bind(EndpointToSupplierURI.class).to(InternalURLSupplier.class);
}
@Singleton
public static class InternalURLSupplier implements EndpointToSupplierURI {
@Override
public Supplier<URI> apply(Endpoint input) {
System.err.println("InternalURLSupplier:" + input);
return Suppliers.ofInstance(input.getInternalURL() != null ? input.getInternalURL() : input.getPublicURL());
}
public String toString() {
return "supplyInternalURL()";
}
}
}
...
ProviderMetadata provider = Providers.withId("cloudfiles-us");
ContextBuilder builder = ContextBuilder.newBuilder(provider).credentials(userName, apiKey);
if (useServicenet) {
builder.modules(ImmutableSet.<Module>of(new RackspaceServicenetModule()));
}
return builder.build(BlobStoreContext.class);
Thanks,
Ross