Package io.reactivex.rxjava3.subscribers
Default wrappers and implementations for
Subscriber-based consumer classes and interfaces,
including disposable (DisposableSubscriber) and resource-tracking
(ResourceSubscriber)
variants and the TestSubscriber that allows unit testing
Flowable-based flows.-
Class Summary Class Description DefaultSubscriber<T> Abstract base implementation of aSubscriberwith support for requesting viaDefaultSubscriber.request(long), cancelling via viaDefaultSubscriber.cancel()(both synchronously) and callsDefaultSubscriber.onStart()when the subscription happens.DisposableSubscriber<T> An abstract Subscriber that allows asynchronous, external cancellation by implementingDisposable.ResourceSubscriber<T> An abstract Subscriber that allows asynchronous cancellation of its subscription and associated resources.SafeSubscriber<T> Wraps anotherSubscriberand ensures allonXXXmethods conform the protocol (except the requirement for serialized access).SerializedSubscriber<T> Serializes access to theSubscriber.onNext(Object),Subscriber.onError(Throwable)andSubscriber.onComplete()methods of anotherSubscriber.TestSubscriber<T> ASubscriberimplementation that records events and allows making assertions about them. -
Enum Summary Enum Description TestSubscriber.EmptySubscriber A subscriber that ignores all events and does not report errors.