Object
DelegateSubscriber<T>
- All Implemented Interfaces:
Flow.Subscriber<T>
Subscriber which wraps original subscriber and delegates all calls to it.
It allows to override behavior of the original subscriber without redefining all methods of it but only those which are of the interest.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns subscription if subscriber is already subscribedvoid
void
void
void
onSubscribe
(Flow.Subscription subscription)
-
Field Details
-
subscription
-
-
Constructor Details
-
DelegateSubscriber
-
-
Method Details
-
onSubscribe
- Specified by:
onSubscribe
in interfaceFlow.Subscriber<T>
- Throws:
PreconditionException
-
onNext
- Specified by:
onNext
in interfaceFlow.Subscriber<T>
-
onError
- Specified by:
onError
in interfaceFlow.Subscriber<T>
-
onComplete
public void onComplete()- Specified by:
onComplete
in interfaceFlow.Subscriber<T>
-
getSubscription
Returns subscription if subscriber is already subscribed
-