Package org.forgerock.openig.reactive
Class MdcAwareSingleObserver<T>
java.lang.Object
org.forgerock.openig.reactive.MdcAwareSingleObserver<T>
- Type Parameters:
 T- the SingleObserver's type.
- All Implemented Interfaces:
 io.reactivex.rxjava3.core.SingleObserver<T>
public final class MdcAwareSingleObserver<T>
extends Object
implements io.reactivex.rxjava3.core.SingleObserver<T>
A SingleObserver wrapper that manages the MDC.
- 
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.reactivex.rxjava3.core.SingleObserver<T>mdcAwareSingleObserver(io.reactivex.rxjava3.core.SingleObserver<T> delegate) Wraps the delegate SingleObserver with another SingleObserver instance that will capture the current MDC context, and will use it when delegating the calls to the delegated SingleObserver.voidvoidonSubscribe(@NonNull io.reactivex.rxjava3.disposables.Disposable disposable) void 
- 
Method Details
- 
onSubscribe
public void onSubscribe(@NonNull @NonNull io.reactivex.rxjava3.disposables.Disposable disposable) - Specified by:
 onSubscribein interfaceio.reactivex.rxjava3.core.SingleObserver<T>
 - 
onError
- Specified by:
 onErrorin interfaceio.reactivex.rxjava3.core.SingleObserver<T>
 - 
onSuccess
- Specified by:
 onSuccessin interfaceio.reactivex.rxjava3.core.SingleObserver<T>
 - 
mdcAwareSingleObserver
public static <T> io.reactivex.rxjava3.core.SingleObserver<T> mdcAwareSingleObserver(io.reactivex.rxjava3.core.SingleObserver<T> delegate) Wraps the delegate SingleObserver with another SingleObserver instance that will capture the current MDC context, and will use it when delegating the calls to the delegated SingleObserver.- Type Parameters:
 T- The wrapped SingleObserver's return type.- Parameters:
 delegate- The wrapped observer- Returns:
 - a wrapped SingleObserver.
 
 
 -