T - the type parameterpublic class RestfulResourceUpdater<T> extends Object
| Constructor | Description |
|---|---|
RestfulResourceUpdater(String restfulResourceUrl) |
Instantiates a new Restful resource updater.
|
RestfulResourceUpdater(String restfulResourceUrl,
int periodSeconds) |
Instantiates a new Restful resource updater.
|
RestfulResourceUpdater(String restfulResourceUrl,
int periodSeconds,
long initialDelayMillis) |
Instantiates a new Restful resource updater.
|
RestfulResourceUpdater(String restfulResourceUrl,
int periodSeconds,
long initialDelayMillis,
java.util.function.Consumer<T> updateConsumer) |
Instantiates a new Restful resource updater.
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getCachedJsonString() |
Gets cached json string.
|
T |
getCachedResource() |
Gets cached resource.
|
String |
getRestfulResourceUrl() |
Gets restful resource url.
|
com.fasterxml.jackson.core.type.TypeReference<T> |
getTypeReference() |
Gets type reference.
|
Optional<T> |
updateResource() |
Update resource optional.
|
void |
updateResource(java.util.function.Consumer<T> updateConsumer) |
Update resource.
|
Optional<T> |
updateResourceWithLog() |
Update resource with log optional.
|
public RestfulResourceUpdater(String restfulResourceUrl)
restfulResourceUrl - the restful resource urlpublic RestfulResourceUpdater(String restfulResourceUrl, int periodSeconds)
restfulResourceUrl - the restful resource urlperiodSeconds - the period secondspublic RestfulResourceUpdater(String restfulResourceUrl, int periodSeconds, long initialDelayMillis)
restfulResourceUrl - the restful resource urlperiodSeconds - the period secondsinitialDelayMillis - the initial delay millispublic RestfulResourceUpdater(String restfulResourceUrl, int periodSeconds, long initialDelayMillis, java.util.function.Consumer<T> updateConsumer)
restfulResourceUrl - the restful resource urlperiodSeconds - the period secondsinitialDelayMillis - the initial delay millisupdateConsumer - the update consumerpublic Optional<T> updateResourceWithLog()
public void updateResource(java.util.function.Consumer<T> updateConsumer)
updateConsumer - the update consumerpublic String getRestfulResourceUrl()
public com.fasterxml.jackson.core.type.TypeReference<T> getTypeReference()
public String getCachedJsonString()
public T getCachedResource()
Copyright © 2018. All rights reserved.