Class LatestValueSubscriber<T>
java.lang.Object
io.servicetalk.concurrent.internal.LatestValueSubscriber<T>
- Type Parameters:
T- The type of data.
- All Implemented Interfaces:
PublisherSource.Subscriber<T>
@Deprecated
public final class LatestValueSubscriber<T>
extends Object
implements PublisherSource.Subscriber<T>
Deprecated.
This class is no longer used by ServiceTalk and will be removed in the future releases. If you depend on
it, consider copying into your codebase.
A
PublisherSource.Subscriber which makes the latest value from onNext(Object) available outside the context of the
PublisherSource.Subscriber.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlastSeenValue(T defaultValue) Deprecated.Get the last seen value.voidDeprecated.Callback to signal completion of thePublisherSourcefor thisSubscriber.voidDeprecated.Callback to receive anerrorfor thisSubscriber.voidDeprecated.Callback to receive adataelement for thisSubscriber.voidDeprecated.Callback to receive aPublisherSource.Subscriptionfor thisSubscriber.
-
Constructor Details
-
LatestValueSubscriber
public LatestValueSubscriber()Deprecated.
-
-
Method Details
-
onSubscribe
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive aPublisherSource.Subscriptionfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onSubscribein interfacePublisherSource.Subscriber<T>- Parameters:
s-PublisherSource.Subscriptionfor thisSubscriber.
-
onNext
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive adataelement for thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onNextin interfacePublisherSource.Subscriber<T>- Parameters:
newValue- Adataelement.
-
onError
Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to receive anerrorfor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onErrorin interfacePublisherSource.Subscriber<T>- Parameters:
t-errorfor thisSubscriber.
-
onComplete
public void onComplete()Deprecated.Description copied from interface:PublisherSource.SubscriberCallback to signal completion of thePublisherSourcefor thisSubscriber.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onCompletein interfacePublisherSource.Subscriber<T>
-
lastSeenValue
Deprecated.Get the last seen value.- Parameters:
defaultValue- The default value if there has been no values seen- Returns:
- the last seen value
-