| Modifier and Type | Method and Description |
|---|---|
static <T> Call<T> |
defer(Callable<Call<T>> callable)
|
static <T> Call<T> |
failure(IOException failure)
Creates a failed
Call from failure. |
static <T> Call<T> |
failure(Throwable failure)
Creates a failed
Call from failure. |
static <T> Call<T> |
response(Response<T> response) |
static <T> Call<T> |
response(T successValue) |
public static <T> Call<T> failure(IOException failure)
Call from failure.public static <T> Call<T> failure(Throwable failure)
Call from failure.
Note: When invoking execute() on the returned Call, if
failure is a RuntimeException, Error, or IOException subtype
it is thrown directly. Otherwise it is "sneaky thrown" despite not being declared.
Copyright © 2020 Square, Inc.. All rights reserved.