Class MappingSubscriber<T,U>
- java.lang.Object
-
- software.amazon.awssdk.utils.internal.MappingSubscriber<T,U>
-
- All Implemented Interfaces:
org.reactivestreams.Subscriber<T>
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.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T,U>
MappingSubscriber<T,U>create(org.reactivestreams.Subscriber<? super U> subscriber, Function<T,U> mapFunction)
void
onComplete()
void
onError(Throwable throwable)
void
onNext(T t)
void
onSubscribe(org.reactivestreams.Subscription subscription)
-
-
-
Method Detail
-
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:
onSubscribe
in interfaceorg.reactivestreams.Subscriber<T>
-
onError
public void onError(Throwable throwable)
- Specified by:
onError
in interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()
- Specified by:
onComplete
in interfaceorg.reactivestreams.Subscriber<T>
-
-