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(IAsyncExecutionContext)

Calls the PreInvoke method before calling the next handler in the pipeline.

public override IAsyncResult InvokeAsync(IAsyncExecutionContext executionContext)

Parameters

executionContext IAsyncExecutionContext

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

Returns

IAsyncResult

IAsyncResult which represent an async operation.

InvokeAsyncCallback(IAsyncExecutionContext)

Calls the PostInvoke methods after calling the next handler in the pipeline.

protected override void InvokeAsyncCallback(IAsyncExecutionContext executionContext)

Parameters

executionContext IAsyncExecutionContext

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

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.