-
- All Implemented Interfaces:
-
com.tds.common.reactor.Observer
,com.tds.common.reactor.Subscription
public class SafeSubscriber<T> extends Subscriber<T>
-
-
Field Summary
Fields Modifier and Type Field Description private final Subscriber<out Object>
actual
-
Constructor Summary
Constructors Constructor Description SafeSubscriber(Subscriber<out Object> actual)
-
Method Summary
Modifier and Type Method Description Subscriber<out Object>
getActual()
Returns the Subscriber underlying this {@code SafeSubscriber}
.void
onCompleted()
Notifies the Subscriber that the {@code Observable}
has finished sending push-based notifications.void
onError(Throwable e)
Notifies the Subscriber that the {@code Observable}
has experienced an error condition.void
onNext(T t)
Provides the Subscriber with a new item to observe. -
-
Constructor Detail
-
SafeSubscriber
SafeSubscriber(Subscriber<out Object> actual)
-
-
Method Detail
-
getActual
Subscriber<out Object> getActual()
Returns the Subscriber underlying this
{@code SafeSubscriber}
.
-
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
-
-
-
-