StorageContentValidationDecodingPolicy Class
- java.
lang. Object - com.
azure. storage. common. policy. StorageContentValidationDecodingPolicy
- com.
Implements
public class StorageContentValidationDecodingPolicy
implements HttpPipelinePolicy
HTTP pipeline policy that decodes the storage structured message body returned for downloads when CRC64 content validation is active.
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 Summary
| Constructor | Description |
|---|---|
| StorageContentValidationDecodingPolicy() |
Creates a new instance of StorageContentValidationDecodingPolicy. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
reactor.core.publisher.Mono<Http |
process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) |
Methods inherited from java.lang.Object
Constructor Details
StorageContentValidationDecodingPolicy
public StorageContentValidationDecodingPolicy()
Creates a new instance of StorageContentValidationDecodingPolicy.
Method Details
process
public Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next)
Parameters: