Class PublisherBodySubscriber
java.lang.Object
com.github.mizosoft.methanol.internal.extensions.PublisherBodySubscriber
- All Implemented Interfaces:
HttpResponse.BodySubscriber<Flow.Publisher<List<ByteBuffer>>>, Flow.Subscriber<List<ByteBuffer>>
public final class PublisherBodySubscriber
extends Object
implements HttpResponse.BodySubscriber<Flow.Publisher<List<ByteBuffer>>>
A
HttpResponse.BodySubscriber that exposes the response body as a publisher.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpResponse.BodyHandler<Flow.Publisher<List<ByteBuffer>>> getBody()voidvoidvoidonNext(List<ByteBuffer> item) voidonSubscribe(Flow.Subscription subscription)
-
Constructor Details
-
PublisherBodySubscriber
public PublisherBodySubscriber()
-
-
Method Details
-
getBody
- Specified by:
getBodyin interfaceHttpResponse.BodySubscriber<Flow.Publisher<List<ByteBuffer>>>
-
onSubscribe
- Specified by:
onSubscribein interfaceFlow.Subscriber<List<ByteBuffer>>
-
onNext
- Specified by:
onNextin interfaceFlow.Subscriber<List<ByteBuffer>>
-
onError
- Specified by:
onErrorin interfaceFlow.Subscriber<List<ByteBuffer>>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceFlow.Subscriber<List<ByteBuffer>>
-
bodyHandler
-