Class ResponseOrException<R>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.waiters.ResponseOrException<R>
-
- Type Parameters:
R- response type
@SdkPublicApi public final class ResponseOrException<R> extends Object
Represents a value that can be either a response or a Throwable
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Optional<Throwable>exception()static <R> ResponseOrException<R>exception(Throwable value)Create a new ResponseOrException with the exceptioninthashCode()Optional<R>response()static <R> ResponseOrException<R>response(R value)Create a new ResponseOrException with the response
-
-
-
Method Detail
-
response
public Optional<R> response()
- Returns:
- the optional response that has matched with the waiter success condition
-
exception
public Optional<Throwable> exception()
- Returns:
- the optional exception that has matched with the waiter success condition
-
response
public static <R> ResponseOrException<R> response(R value)
Create a new ResponseOrException with the response- Type Parameters:
R- Response type- Parameters:
value- response
-
exception
public static <R> ResponseOrException<R> exception(Throwable value)
Create a new ResponseOrException with the exception- Type Parameters:
R- Response type- Parameters:
value- exception
-
-