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.Implementation notes: this class should've been outside internal package, but we can't fix it due to backwards compatibility reasons.
-
-
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)voidonComplete()voidonError(Throwable throwable)voidonNext(T t)voidonSubscribe(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:
onSubscribein interfaceorg.reactivestreams.Subscriber<T>
-
onError
public void onError(Throwable throwable)
- Specified by:
onErrorin interfaceorg.reactivestreams.Subscriber<T>
-
onComplete
public void onComplete()
- Specified by:
onCompletein interfaceorg.reactivestreams.Subscriber<T>
-
-