Class MappingSubscriber<T,U>
java.lang.Object
software.amazon.awssdk.utils.internal.MappingSubscriber<T,U>
- All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
@SdkProtectedApi
public class MappingSubscriber<T,U>
extends Object
implements org.reactivestreams.Subscriber<T>
Maps a subscriber of one type to another type. If an exception is thrown by the mapping function itself, the error
will be propagated to the downstream subscriber as if it had come from the publisher and then the subscription will
be implicitly cancelled and no further events from the publisher will be passed along.
Implementation notes: this class should've been outside internal package, but we can't fix it due to backwards compatibility reasons.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,U> MappingSubscriber <T, U> voidvoidvoidvoidonSubscribe(org.reactivestreams.Subscription subscription)
-
Method Details
-
create
public static <T,U> MappingSubscriber<T,U> create(org.reactivestreams.Subscriber<? super U> subscriber, Function<T, U> mapFunction) -
onSubscribe
public void onSubscribe(org.reactivestreams.Subscription subscription) - Specified by:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onError
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
onNext
-