public class ConfigFetcher
extends java.lang.Object
implements java.io.Closeable
ConfigCache implementation to fetch the latest configuration.| Constructor and Description |
|---|
ConfigFetcher(okhttp3.OkHttpClient httpClient,
java.lang.String apiKey)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.util.concurrent.CompletableFuture<FetchResponse> |
getConfigurationJsonStringAsync()
Gets the latest configuration from the network asynchronously.
|
public ConfigFetcher(okhttp3.OkHttpClient httpClient,
java.lang.String apiKey)
httpClient - the http client.apiKey - the api key.public java.util.concurrent.CompletableFuture<FetchResponse> getConfigurationJsonStringAsync()
FetchResponse instance which holds the result of the fetch.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException