java.lang.Object
com.github.mizosoft.methanol.testing.BodyCollector
- All Implemented Interfaces:
Flow.Subscriber<ByteBuffer>
Collects BodyPublisher's content.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffer
collect
(Flow.Publisher<ByteBuffer> publisher) static ByteBuffer
collect
(List<ByteBuffer> buffers) static CompletableFuture
<ByteBuffer> collectAsync
(Flow.Publisher<ByteBuffer> publisher) static CompletableFuture
<String> collectStringAsync
(Flow.Publisher<ByteBuffer> publisher, Charset charset) future()
void
void
void
onNext
(ByteBuffer item) void
onSubscribe
(Flow.Subscription subscription)
-
Constructor Details
-
BodyCollector
public BodyCollector()
-
-
Method Details
-
onSubscribe
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<ByteBuffer>
-
onNext
- Specified by:
onNext
in interfaceFlow.Subscriber<ByteBuffer>
-
onError
- Specified by:
onError
in interfaceFlow.Subscriber<ByteBuffer>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceFlow.Subscriber<ByteBuffer>
-
future
-
collect
-
collect
-
collectAsync
-
collectStringAsync
public static CompletableFuture<String> collectStringAsync(Flow.Publisher<ByteBuffer> publisher, Charset charset)
-