Class TimeoutSubscriber<T, S extends Flow.Subscriber<? super T>>
java.lang.Object
com.github.mizosoft.methanol.internal.flow.ForwardingSubscriber<T>
com.github.mizosoft.methanol.internal.flow.SerializedForwardingSubscriber<T>
com.github.mizosoft.methanol.internal.flow.TimeoutSubscriber<T,S>
- All Implemented Interfaces:
Flow.Subscriber<T>
- Direct Known Subclasses:
TimeoutBodySubscriber
public abstract class TimeoutSubscriber<T, S extends Flow.Subscriber<? super T>>
extends SerializedForwardingSubscriber<T>
A subscriber that intercepts requests to upstream and schedules error completion if each
requested item isn't received within a timeout.
-
Field Summary
Fields inherited from class ForwardingSubscriber
upstream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Sdelegate()Returns the downstream to which signals are forwarded.voidvoidvoidvoidonSubscribe(Flow.Subscription subscription) protected abstract ThrowabletimeoutError(long index, Duration timeout) Methods inherited from class ForwardingSubscriber
toString
-
Constructor Details
-
TimeoutSubscriber
-
-
Method Details
-
delegate
Description copied from class:ForwardingSubscriberReturns the downstream to which signals are forwarded.- Specified by:
delegatein classForwardingSubscriber<T>
-
onSubscribe
- Specified by:
onSubscribein interfaceFlow.Subscriber<T>- Overrides:
onSubscribein classSerializedForwardingSubscriber<T>
-
onNext
- Specified by:
onNextin interfaceFlow.Subscriber<T>- Overrides:
onNextin classSerializedForwardingSubscriber<T>
-
onError
- Specified by:
onErrorin interfaceFlow.Subscriber<T>- Overrides:
onErrorin classSerializedForwardingSubscriber<T>
-
onComplete
public void onComplete()- Specified by:
onCompletein interfaceFlow.Subscriber<T>- Overrides:
onCompletein classSerializedForwardingSubscriber<T>
-
timeoutError
-