-
- All Implemented Interfaces:
-
com.tds.common.reactor.Observer,com.tds.common.reactor.Subscription
public class SerializedSubscriber<T> extends Subscriber<T>
-
-
Constructor Summary
Constructors Constructor Description SerializedSubscriber(Subscriber<out Object> s)SerializedSubscriber(Subscriber<out Object> s, boolean shareSubscriptions)Constructor for wrapping and serializing a subscriber optionally sharing the same underlying subscriptionlist.
-
Method Summary
Modifier and Type Method Description voidonCompleted()Notifies the Subscriber that the {@code Observable}has finished sending push-based notifications.voidonError(Throwable e)Notifies the Subscriber that the {@code Observable}has experienced an error condition.voidonNext(T t)Provides the Subscriber with a new item to observe. -
-
Constructor Detail
-
SerializedSubscriber
SerializedSubscriber(Subscriber<out Object> s)
-
SerializedSubscriber
SerializedSubscriber(Subscriber<out Object> s, boolean shareSubscriptions)
Constructor for wrapping and serializing a subscriber optionally sharing the same underlying subscriptionlist.- Parameters:
s- the subscriber to wrap and serializeshareSubscriptions- if{@code true}, the same subscription list is shared between this subscriber and{@code s}.
-
-
Method Detail
-
onCompleted
void onCompleted()
Notifies the Subscriber that the
{@code Observable}has finished sending push-based notifications.The
{@code Observable}will not call this method if it calls onError.
-
onError
void onError(Throwable e)
Notifies the Subscriber that the
{@code Observable}has experienced an error condition.If the
{@code Observable}calls this method, it will not thereafter call onNext or onCompleted.- Parameters:
e- the exception encountered by the Observable
-
onNext
void onNext(T t)
Provides the Subscriber with a new item to observe.
The
{@code Observable}may call this method 0 or more times.The
{@code Observable}will not call this method again after it calls either onCompleted or onError.- Parameters:
t- the item emitted by the Observable
-
-
-
-