Class ExecutionInterceptorChain
java.lang.Object
software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain
A wrapper for a list of
ExecutionInterceptor
s that ensures the interceptors are executed in the correct order as it
is documented in the ExecutionInterceptor
documentation.
Interceptors are invoked in forward order up to beforeTransmission(software.amazon.awssdk.core.interceptor.Context.BeforeTransmission, software.amazon.awssdk.core.interceptor.ExecutionAttributes)
and in reverse order after (and including)
afterTransmission(software.amazon.awssdk.core.interceptor.Context.AfterTransmission, software.amazon.awssdk.core.interceptor.ExecutionAttributes)
. This ensures the last interceptors to modify the request are the first interceptors to see the
response.-
Constructor Summary
ConstructorsConstructorDescriptionExecutionInterceptorChain
(List<ExecutionInterceptor> interceptors) Create a chain that will execute the provided interceptors in the order they are provided. -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterExecution
(Context.AfterExecution context, ExecutionAttributes executionAttributes) void
afterMarshalling
(Context.AfterMarshalling context, ExecutionAttributes executionAttributes) void
afterTransmission
(Context.AfterTransmission context, ExecutionAttributes executionAttributes) void
afterUnmarshalling
(Context.AfterUnmarshalling context, ExecutionAttributes executionAttributes) void
beforeExecution
(Context.BeforeExecution context, ExecutionAttributes executionAttributes) void
beforeMarshalling
(Context.BeforeMarshalling context, ExecutionAttributes executionAttributes) void
beforeTransmission
(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) void
beforeUnmarshalling
(Context.BeforeUnmarshalling context, ExecutionAttributes executionAttributes) modifyAsyncHttpResponse
(InterceptorContext context, ExecutionAttributes executionAttributes) modifyException
(DefaultFailedExecutionContext context, ExecutionAttributes executionAttributes) modifyHttpRequestAndHttpContent
(InterceptorContext context, ExecutionAttributes executionAttributes) modifyHttpResponse
(InterceptorContext context, ExecutionAttributes executionAttributes) modifyRequest
(InterceptorContext context, ExecutionAttributes executionAttributes) modifyResponse
(InterceptorContext context, ExecutionAttributes executionAttributes) void
onExecutionFailure
(Context.FailedExecution context, ExecutionAttributes executionAttributes)
-
Constructor Details
-
ExecutionInterceptorChain
Create a chain that will execute the provided interceptors in the order they are provided.
-
-
Method Details
-
beforeExecution
public void beforeExecution(Context.BeforeExecution context, ExecutionAttributes executionAttributes) -
modifyRequest
public InterceptorContext modifyRequest(InterceptorContext context, ExecutionAttributes executionAttributes) -
beforeMarshalling
public void beforeMarshalling(Context.BeforeMarshalling context, ExecutionAttributes executionAttributes) -
afterMarshalling
public void afterMarshalling(Context.AfterMarshalling context, ExecutionAttributes executionAttributes) -
modifyHttpRequestAndHttpContent
public InterceptorContext modifyHttpRequestAndHttpContent(InterceptorContext context, ExecutionAttributes executionAttributes) -
beforeTransmission
public void beforeTransmission(Context.BeforeTransmission context, ExecutionAttributes executionAttributes) -
afterTransmission
public void afterTransmission(Context.AfterTransmission context, ExecutionAttributes executionAttributes) -
modifyHttpResponse
public InterceptorContext modifyHttpResponse(InterceptorContext context, ExecutionAttributes executionAttributes) -
modifyAsyncHttpResponse
public InterceptorContext modifyAsyncHttpResponse(InterceptorContext context, ExecutionAttributes executionAttributes) -
beforeUnmarshalling
public void beforeUnmarshalling(Context.BeforeUnmarshalling context, ExecutionAttributes executionAttributes) -
afterUnmarshalling
public void afterUnmarshalling(Context.AfterUnmarshalling context, ExecutionAttributes executionAttributes) -
modifyResponse
public InterceptorContext modifyResponse(InterceptorContext context, ExecutionAttributes executionAttributes) -
afterExecution
-
modifyException
public DefaultFailedExecutionContext modifyException(DefaultFailedExecutionContext context, ExecutionAttributes executionAttributes) -
onExecutionFailure
public void onExecutionFailure(Context.FailedExecution context, ExecutionAttributes executionAttributes)
-