Class DefaultFailedExecutionContext
- java.lang.Object
-
- software.amazon.awssdk.core.internal.interceptor.DefaultFailedExecutionContext
-
- All Implemented Interfaces:
Context.FailedExecution
,ToCopyableBuilder<DefaultFailedExecutionContext.Builder,DefaultFailedExecutionContext>
public class DefaultFailedExecutionContext extends Object implements Context.FailedExecution, ToCopyableBuilder<DefaultFailedExecutionContext.Builder,DefaultFailedExecutionContext>
An SDK-internal implementation ofContext.FailedExecution
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultFailedExecutionContext.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultFailedExecutionContext.Builder
builder()
Throwable
exception()
The exception associated with the failed execution.Optional<SdkHttpRequest>
httpRequest()
The latest version of theSdkHttpRequest
available when the execution failed.Optional<SdkHttpResponse>
httpResponse()
The latest version of theSdkHttpResponse
available when the execution failed.SdkRequest
request()
The latest version of theSdkRequest
available when the execution failed.Optional<SdkResponse>
response()
The latest version of theSdkResponse
available when the execution failed.DefaultFailedExecutionContext.Builder
toBuilder()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
request
public SdkRequest request()
Description copied from interface:Context.FailedExecution
The latest version of theSdkRequest
available when the execution failed. This will never return null.- Specified by:
request
in interfaceContext.FailedExecution
-
httpRequest
public Optional<SdkHttpRequest> httpRequest()
Description copied from interface:Context.FailedExecution
The latest version of theSdkHttpRequest
available when the execution failed. This may be aSdkHttpFullRequest
; if so, it can be accessed by casting the returnedSdkHttpRequest
. If the execution failed before or during request marshalling, this will returnOptional.empty()
.- Specified by:
httpRequest
in interfaceContext.FailedExecution
-
httpResponse
public Optional<SdkHttpResponse> httpResponse()
Description copied from interface:Context.FailedExecution
The latest version of theSdkHttpResponse
available when the execution failed. This may be aSdkHttpFullResponse
; if so, it can be accessed by casting the returnedSdkHttpResponse
. If the execution failed before or during transmission, this will returnOptional.empty()
.- Specified by:
httpResponse
in interfaceContext.FailedExecution
-
response
public Optional<SdkResponse> response()
Description copied from interface:Context.FailedExecution
The latest version of theSdkResponse
available when the execution failed. If the execution failed before or during response unmarshalling, this will returnOptional.empty()
.- Specified by:
response
in interfaceContext.FailedExecution
-
exception
public Throwable exception()
Description copied from interface:Context.FailedExecution
The exception associated with the failed execution. This is the reason the execution has failed, and is the exception that will be returned or thrown from the client method call. This will never return null.- Specified by:
exception
in interfaceContext.FailedExecution
-
toBuilder
public DefaultFailedExecutionContext.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<DefaultFailedExecutionContext.Builder,DefaultFailedExecutionContext>
-
builder
public static DefaultFailedExecutionContext.Builder builder()
-
-