T - Class of object which will be returned by the futurepublic class StravaAPIFuture<T> extends Object
Wrapper class for handling exceptions thrown by the API via a CompletableFuture
| Constructor and Description |
|---|
StravaAPIFuture()
No argument constructor provides the wrapped future
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete(T result) |
void |
completeExceptionally(Throwable cause) |
T |
get()
Wrapper for the
CompletableFuture.get() method handles exceptions and maps to javastrava exceptions |
public StravaAPIFuture()
public void complete(T result)
result - The object to return via the futurepublic void completeExceptionally(Throwable cause)
cause - Cause of the exceptional completionpublic T get()
CompletableFuture.get() method handles exceptions and maps to javastrava exceptionsCopyright © 2016 Dan Shannon. All rights reserved.