Class StorageContentValidationDecodingPolicy
- All Implemented Interfaces:
com.azure.core.http.policy.HttpPipelinePolicy
The policy decides when to opt in (via the context key), tells the service to
encode the response (via the request header), constructs the decoder and the wrapper response, and
translates decoder-level failures (malformed framing, CRC mismatch, premature end-of-stream) into reactive
IOException errors.
This policy uses PER_RETRY semantics by default, so
each retry produces a fresh response that this policy wraps with a fresh decoder. A CRC failure on one attempt
cannot pollute another, and the storage download retry logic (BlobAsyncClientBase.downloadStream...) can
resume by reissuing range requests; each new range response is validated end-to-end on its own.
Because the wrapped StructuredMessageDecoder only releases payload bytes after the corresponding
segment's CRC has been verified, the DecodedResponse's body Flux is guaranteed to contain only validated
bytes – callers never see a byte that could later fail validation, even when retries are involved.
-
Constructor Details
-
StorageContentValidationDecodingPolicy
public StorageContentValidationDecodingPolicy()Creates a new instance ofStorageContentValidationDecodingPolicy.
-
-
Method Details
-
process
public Mono<com.azure.core.http.HttpResponse> process(com.azure.core.http.HttpPipelineCallContext context, com.azure.core.http.HttpPipelineNextPolicy next) - Specified by:
processin interfacecom.azure.core.http.policy.HttpPipelinePolicy
-