X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cadi%2Fclient%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faaf%2Fcadi%2Flocator%2FSingleEndpointLocator.java;h=816dec821213e42d4cf567ddad91e391ea14fae6;hb=refs%2Fchanges%2F75%2F65275%2F1;hp=23bcd4ad9323a8291bea9d72dfde988a14239a45;hpb=824dc7b5fc0e1ccdf7f460479aff344727f0f01e;p=aaf%2Fauthz.git diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/SingleEndpointLocator.java b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/SingleEndpointLocator.java index 23bcd4ad..816dec82 100644 --- a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/SingleEndpointLocator.java +++ b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/SingleEndpointLocator.java @@ -28,65 +28,65 @@ import org.onap.aaf.cadi.Locator; import org.onap.aaf.cadi.LocatorException; public class SingleEndpointLocator implements Locator { - private final URI uri; - private final static Item item = new Item() {}; - private Date noRetryUntil; - - public SingleEndpointLocator(final URI uri) { - this.uri = uri; - } - - public SingleEndpointLocator(final String endpoint) throws URISyntaxException { - this.uri = new URI(endpoint); - } + private final URI uri; + private final static Item item = new Item() {}; + private Date noRetryUntil; + + public SingleEndpointLocator(final URI uri) { + this.uri = uri; + } + + public SingleEndpointLocator(final String endpoint) throws URISyntaxException { + this.uri = new URI(endpoint); + } - @Override - public URI get(Item item) throws LocatorException { - return uri; - } + @Override + public URI get(Item item) throws LocatorException { + return uri; + } - @Override - public boolean hasItems() { - if(noRetryUntil!=null) { - if(new Date().after(noRetryUntil)) { - noRetryUntil = null; - } else { - return false; - } - } - return true; - } + @Override + public boolean hasItems() { + if(noRetryUntil!=null) { + if(new Date().after(noRetryUntil)) { + noRetryUntil = null; + } else { + return false; + } + } + return true; + } - @Override - public void invalidate(Item item) throws LocatorException { - // one minute timeout, because there is no other item - noRetryUntil = new Date(System.currentTimeMillis()+60000); - } + @Override + public void invalidate(Item item) throws LocatorException { + // one minute timeout, because there is no other item + noRetryUntil = new Date(System.currentTimeMillis()+60000); + } - @Override - public Item best() throws LocatorException { - return item; - } + @Override + public Item best() throws LocatorException { + return item; + } - @Override - public Item first() throws LocatorException { - return item; - } + @Override + public Item first() throws LocatorException { + return item; + } - @Override - public Item next(Item inItem) throws LocatorException { - // only one item - return null; - } + @Override + public Item next(Item inItem) throws LocatorException { + // only one item + return null; + } - @Override - public boolean refresh() { - // Never refreshed - return true; - } + @Override + public boolean refresh() { + // Never refreshed + return true; + } - @Override - public void destroy() { - // Nothing to do here - } + @Override + public void destroy() { + // Nothing to do here + } }