Table of Contents

Class CallbackHandler

Namespace
Amazon.Runtime.Internal
Assembly
AWSSDK.Core.dll

A pipeline handler which provides hooks to run external code in the pre-invoke and post-invoke phases.

public class CallbackHandler : PipelineHandler, IPipelineHandler
Inheritance
CallbackHandler
Implements
Inherited Members

Constructors

CallbackHandler()

public CallbackHandler()

Properties

OnPostInvoke

Action to execute on the post invoke phase.

public Action<IExecutionContext> OnPostInvoke { get; set; }

Property Value

Action<IExecutionContext>

OnPreInvoke

Action to execute on the pre invoke phase.

public Action<IExecutionContext> OnPreInvoke { get; set; }

Property Value

Action<IExecutionContext>

Methods

InvokeAsync<T>(IExecutionContext)

Calls the PreInvoke and PostInvoke methods before and after calling the next handler in the pipeline.

public override Task<T> InvokeAsync<T>(IExecutionContext executionContext) where T : AmazonWebServiceResponse, new()

Parameters

executionContext IExecutionContext

The execution context, it contains the request and response context.

Returns

Task<T>

A task that represents the asynchronous operation.

Type Parameters

T

The response type for the current request.

InvokeSync(IExecutionContext)

Calls the PreInvoke and PostInvoke methods before and after calling the next handler in the pipeline.

public override void InvokeSync(IExecutionContext executionContext)

Parameters

executionContext IExecutionContext

The execution context which contains both the requests and response context.

PostInvoke(IExecutionContext)

Executes the OnPreInvoke action as part of post-invoke.

protected void PostInvoke(IExecutionContext executionContext)

Parameters

executionContext IExecutionContext

The execution context, it contains the request and response context.

PreInvoke(IExecutionContext)

Executes the OnPreInvoke action as part of pre-invoke.

protected void PreInvoke(IExecutionContext executionContext)

Parameters

executionContext IExecutionContext

The execution context, it contains the request and response context.