Module methanol
Class SupplierBodyPublisher<T>
- java.lang.Object
-
- com.github.mizosoft.methanol.internal.extensions.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 longcontentLength()voidsubscribe(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)
-
-
-
Method Detail
-
contentLength
public long contentLength()
- Specified by:
contentLengthin interfacejava.net.http.HttpRequest.BodyPublisher
-
subscribe
public void subscribe(java.util.concurrent.Flow.Subscriber<? super java.nio.ByteBuffer> subscriber)
- Specified by:
subscribein interfacejava.util.concurrent.Flow.Publisher<T>
-
-