public class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static io.github.resilience4j.retry.RetryConfig |
buildRetryConfig(Class<? extends Throwable>... errorClasses) |
static io.github.resilience4j.retry.RetryConfig |
buildRetryConfig(Predicate<Throwable> predicate) |
static String |
formatDurationAsTimespan(Duration duration) |
static com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
static String |
getPackageVersion() |
static reactor.core.publisher.Mono<String> |
getResponseBody(com.azure.core.http.HttpResponse httpResponse) |
static boolean |
isGzipResponse(com.azure.core.http.HttpResponse response)
Checks if an HTTP response is GZIP compressed.
|
static boolean |
isRetriableIOException(IOException ex) |
static reactor.core.publisher.Mono<String> |
processGzipBody(reactor.core.publisher.Flux<ByteBuffer> gzipBody) |
static reactor.core.publisher.Mono<String> |
processNonGzipBody(reactor.core.publisher.Flux<ByteBuffer> body) |
static InputStream |
resolveInputStream(com.azure.core.http.HttpResponse response,
InputStream contentStream)
Method responsible for constructing the correct InputStream type based on content encoding header
|
public static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
public static String getPackageVersion()
public static boolean isRetriableIOException(IOException ex)
public static io.github.resilience4j.retry.RetryConfig buildRetryConfig(@Nullable
Class<? extends Throwable>... errorClasses)
public static io.github.resilience4j.retry.RetryConfig buildRetryConfig(Predicate<Throwable> predicate)
public static boolean isGzipResponse(com.azure.core.http.HttpResponse response)
response - The HTTP response to checkpublic static reactor.core.publisher.Mono<String> getResponseBody(com.azure.core.http.HttpResponse httpResponse)
public static reactor.core.publisher.Mono<String> processGzipBody(reactor.core.publisher.Flux<ByteBuffer> gzipBody)
public static reactor.core.publisher.Mono<String> processNonGzipBody(reactor.core.publisher.Flux<ByteBuffer> body)
public static InputStream resolveInputStream(com.azure.core.http.HttpResponse response, InputStream contentStream)
response - The response object to determine the content encodingcontentStream - The InputStream containing the contentCopyright © 2025. All rights reserved.