import java.net.URISyntaxException;
import java.util.Date;
-import org.onap.aaf.cadi.Locator;
import org.onap.aaf.cadi.LocatorException;
-public class SingleEndpointLocator implements Locator<URI> {
+public class SingleEndpointLocator implements SizedLocator<URI> {
private final URI uri;
private final static Item item = new Item() {};
private Date noRetryUntil;
this.uri = uri;
}
- public SingleEndpointLocator(final String endpoint) throws URISyntaxException {
- this.uri = new URI(endpoint);
+ public SingleEndpointLocator(final String endpoint) throws LocatorException {
+ try {
+ this.uri = new URI(endpoint);
+ } catch (URISyntaxException e) {
+ throw new LocatorException(e);
+ }
}
@Override
// Never refreshed
return true;
}
+
+ @Override
+ public int size() {
+ return 1;
+ }
@Override
public void destroy() {