Class SupplierBodyPublisher<T>
java.lang.Object
com.github.mizosoft.methanol.internal.extensions.SupplierBodyPublisher<T>
- All Implemented Interfaces:
HttpRequest.BodyPublisher, Flow.Publisher<ByteBuffer>
-
Constructor Summary
ConstructorsConstructorDescriptionSupplierBodyPublisher(Supplier<T> supplier, Function<T, HttpRequest.BodyPublisher> publisherFactory) -
Method Summary
Modifier and TypeMethodDescriptionlongvoidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber)
-
Constructor Details
-
SupplierBodyPublisher
public SupplierBodyPublisher(Supplier<T> supplier, Function<T, HttpRequest.BodyPublisher> publisherFactory)
-
-
Method Details
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<T>
-