Module methanol
Class AsyncSubscriberAdapter<T,S extends java.util.concurrent.Flow.Subscriber<? super java.util.List<java.nio.ByteBuffer>>>
- java.lang.Object
-
- com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber<java.util.List<java.nio.ByteBuffer>>
-
- com.github.mizosoft.methanol.internal.extensions.AsyncSubscriberAdapter<T,S>
-
- Type Parameters:
T- the body typeS- the subscriber's type
- All Implemented Interfaces:
java.net.http.HttpResponse.BodySubscriber<T>,java.util.concurrent.Flow.Subscriber<java.util.List<java.nio.ByteBuffer>>
public final class AsyncSubscriberAdapter<T,S extends java.util.concurrent.Flow.Subscriber<? super java.util.List<java.nio.ByteBuffer>>> extends ForwardingSubscriber<java.util.List<java.nio.ByteBuffer>> implements java.net.http.HttpResponse.BodySubscriber<T>
Adapts a subscriber to aBodySubscriberwhere the body's completion need not be in accordance withonCompleteoronError.
-
-
Field Summary
-
Fields inherited from class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
upstream
-
-
Constructor Summary
Constructors Constructor Description AsyncSubscriberAdapter(S downstream, java.util.function.Function<? super S,? extends java.util.concurrent.CompletionStage<T>> asyncFinisher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.concurrent.Flow.Subscriber<? super java.util.List<java.nio.ByteBuffer>>delegate()Returns the downstream to which signals are forwarded.java.util.concurrent.CompletionStage<T>getBody()-
Methods inherited from class com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber
onComplete, onError, onNext, onSubscribe, toString
-
-
-
-
Method Detail
-
delegate
protected java.util.concurrent.Flow.Subscriber<? super java.util.List<java.nio.ByteBuffer>> delegate()
Description copied from class:ForwardingSubscriberReturns the downstream to which signals are forwarded.- Specified by:
delegatein classForwardingSubscriber<java.util.List<java.nio.ByteBuffer>>
-
-