Module methanol

Class Handlers


  • public class Handlers
    extends java.lang.Object
    Static functions for converting the response body into a usable body type.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.util.concurrent.CompletableFuture<T> handleAsync​(java.net.http.HttpResponse.ResponseInfo responseInfo, java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>> publisher, java.net.http.HttpResponse.BodyHandler<T> handler, java.util.concurrent.Executor executor)  
      static <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> handleAsync​(java.net.http.HttpResponse<?> response, java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>> publisher, java.net.http.HttpResponse.BodyHandler<T> handler, java.util.concurrent.Executor executor)  
      static <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> handleAsync​(java.net.http.HttpResponse<java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>>> response, java.net.http.HttpResponse.BodyHandler<T> handler, java.util.concurrent.Executor executor)  
      static <T> Methanol.Interceptor.Chain<java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>>> toPublisherChain​(Methanol.Interceptor.Chain<T> chain, java.util.concurrent.Executor executor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • handleAsync

        public static <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> handleAsync​(java.net.http.HttpResponse<java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>>> response,
                                                                                                            java.net.http.HttpResponse.BodyHandler<T> handler,
                                                                                                            java.util.concurrent.Executor executor)
      • handleAsync

        public static <T> java.util.concurrent.CompletableFuture<java.net.http.HttpResponse<T>> handleAsync​(java.net.http.HttpResponse<?> response,
                                                                                                            java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>> publisher,
                                                                                                            java.net.http.HttpResponse.BodyHandler<T> handler,
                                                                                                            java.util.concurrent.Executor executor)
      • handleAsync

        public static <T> java.util.concurrent.CompletableFuture<T> handleAsync​(java.net.http.HttpResponse.ResponseInfo responseInfo,
                                                                                java.util.concurrent.Flow.Publisher<java.util.List<java.nio.ByteBuffer>> publisher,
                                                                                java.net.http.HttpResponse.BodyHandler<T> handler,
                                                                                java.util.concurrent.Executor executor)