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
-
Method Summary
Modifier and TypeMethodDescriptionlastSeenValue
(T defaultValue) Deprecated.Get the last seen value.void
Deprecated.Callback to signal completion of thePublisherSource
for thisSubscriber
.void
Deprecated.Callback to receive anerror
for thisSubscriber
.void
Deprecated.Callback to receive adata
element for thisSubscriber
.void
Deprecated.Callback to receive aPublisherSource.Subscription
for thisSubscriber
.
-
Constructor Details
-
LatestValueSubscriber
public LatestValueSubscriber()Deprecated.
-
-
Method Details
-
onSubscribe
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive aPublisherSource.Subscription
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onSubscribe
in interfacePublisherSource.Subscriber<T>
- Parameters:
s
-PublisherSource.Subscription
for thisSubscriber
.
-
onNext
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive adata
element for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onNext
in interfacePublisherSource.Subscriber<T>
- Parameters:
newValue
- Adata
element.
-
onError
Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to receive anerror
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onError
in interfacePublisherSource.Subscriber<T>
- Parameters:
t
-error
for thisSubscriber
.
-
onComplete
public void onComplete()Deprecated.Description copied from interface:PublisherSource.Subscriber
Callback to signal completion of thePublisherSource
for thisSubscriber
.See Reactive Streams specifications for the rules about how and when this method will be invoked.
- Specified by:
onComplete
in 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
-