Class ResponseOrException<R>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.waiters.ResponseOrException<R>
-
- Type Parameters:
R
- response type
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 boolean
equals(Object o)
Optional<Throwable>
exception()
static <R> ResponseOrException<R>
exception(Throwable value)
Create a new ResponseOrException with the exceptionint
hashCode()
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
-
-