Module methanol

Class SupplierBodyPublisher<T>

  • All Implemented Interfaces:
    java.net.http.HttpRequest.BodyPublisher, java.util.concurrent.Flow.Publisher<java.nio.ByteBuffer>

    public final class SupplierBodyPublisher<T>
    extends java.lang.Object
    implements java.net.http.HttpRequest.BodyPublisher
    • Constructor Summary

      Constructors 
      Constructor Description
      SupplierBodyPublisher​(java.util.function.Supplier<T> supplier, java.util.function.Function<T,​java.net.http.HttpRequest.BodyPublisher> publisherFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long contentLength()  
      void subscribe​(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)  
      • Methods inherited from class java.lang.Object

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

      • SupplierBodyPublisher

        public SupplierBodyPublisher​(java.util.function.Supplier<T> supplier,
                                     java.util.function.Function<T,​java.net.http.HttpRequest.BodyPublisher> publisherFactory)
    • Method Detail

      • contentLength

        public long contentLength()
        Specified by:
        contentLength in interface java.net.http.HttpRequest.BodyPublisher
      • subscribe

        public void subscribe​(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)
        Specified by:
        subscribe in interface java.util.concurrent.Flow.Publisher<T>