After a SingleSubscriber calls a Single's subscribe method, the
Single calls the SingleSubscriber's onSuccess and onError methods to provide
notifications. A well-behaved Single will call a SingleSubscriber's onSuccess method exactly
once or the SingleSubscriber's onError method exactly once.
Note, that if you want isUnsubscribed to return true after onSuccess or onError
invocation, you need to invoke unsubscribe in these methods.
| Modifier and Type | Field and Description |
|---|---|
| private final SubscriptionList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final void | add(Subscription
the s)Subscription to addAdds a |
| public final boolean | Returns: true if this Subscriber has unsubscribed from its subscriptions, false otherwiseImplements rx. |
| public abstract void | |
| public abstract void | |
| public final void | unsubscribe()
Implements rx. Subscriber that was registered when this Subscription
was received.
|
| cs | back to summary |
|---|---|
| private final SubscriptionList cs | |
| SingleSubscriber | back to summary |
|---|---|
| public SingleSubscriber() | |
| add | back to summary |
|---|---|
| public final void add(Subscription s) Adds a
| |
| isUnsubscribed | back to summary |
|---|---|
| public final boolean isUnsubscribed() Implements rx. Indicates whether this Subscriber has unsubscribed from its list of subscriptions.
| |
| onError | back to summary |
|---|---|
| public abstract void onError(Throwable error) Notifies the SingleSubscriber that the
If the
| |
| onSuccess | back to summary |
|---|---|
| public abstract void onSuccess(T t) Notifies the SingleSubscriber with a single item and that the
The
| |
| unsubscribe | back to summary |
|---|---|
| public final void unsubscribe() Implements rx. Doc from rx. Stops the receipt of notifications on the
This allows deregistering an
| |