你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

HttpPipelinePolicy Interface

public interface HttpPipelinePolicy

A policy within the HttpPipeline.

Method Summary

Modifier and Type Method and Description
default HttpPipelinePosition getPipelinePosition()

Gets the position to place the policy.

abstract Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)

Processes provided request context and invokes the next policy.

default HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)

Processes provided request context and invokes the next policy synchronously.

Method Details

getPipelinePosition

public default HttpPipelinePosition getPipelinePosition()

Gets the position to place the policy.

By default pipeline policies are positioned PER_RETRY.

Returns:

The position to place the policy.

process

public abstract Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)

Processes provided request context and invokes the next policy.

Parameters:

context - The request context.
next - The next policy to invoke.

Returns:

A publisher that initiates the request upon subscription and emits a response on completion.

processSync

public default HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next)

Processes provided request context and invokes the next policy synchronously.

Parameters:

context - The request context.
next - The next policy to invoke.

Returns:

A publisher that initiates the request upon subscription and emits a response on completion.

Applies to