| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the error message stringthe class of the consumer consumer)Builds the error message with the consumer class. |
| public static void | reportDoubleSubscription(Class<?>
the class of the consumer consumer)Report a ProtocolViolationException with a personalized message referencing the simple type name of the consumer class and report it via RxJavaPlugins.onError. |
| public static boolean | Returns: true if successful, false if the content of the AtomicReference was non nullthe target AtomicReference to update upstream, Disposable the Disposable to set on it atomically next, Class<?> the class of the consumer to have a personalized
error message if the upstream already contains a non-cancelled Disposable. observer)Atomically updates the target upstream AtomicReference from null to the non-null next Disposable, otherwise disposes next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared disposed indicator. |
| public static boolean | Returns: true if successful, false if the content of the AtomicReference was non nullthe target AtomicReference to update upstream, Subscription the Subscription to set on it atomically next, Class<?> the class of the consumer to have a personalized
error message if the upstream already contains a non-cancelled Subscription. subscriber)Atomically updates the target upstream AtomicReference from null to the non-null next Subscription, otherwise cancels next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared cancelled indicator. |
| public static boolean | Returns: true if successful, false if the upstream was non nullthe upstream current value upstream, Disposable the Disposable to check for nullness and dispose if necessary next, Class<?> the class of the consumer to have a personalized
error message if the upstream already contains a non-cancelled Disposable. observer)Ensures that the upstream Disposable is null and returns true, otherwise disposes the next Disposable and if the upstream is not the shared disposed instance, reports a ProtocolViolationException due to multiple subscribe attempts. |
| public static boolean | Returns: true if successful, false if the upstream was non nullthe upstream current value upstream, Subscription the Subscription to check for nullness and cancel if necessary next, Class<?> the class of the consumer to have a personalized
error message if the upstream already contains a non-cancelled Subscription. subscriber)Ensures that the upstream Subscription is null and returns true, otherwise cancels the next Subscription and if the upstream is not the shared cancelled instance, reports a ProtocolViolationException due to multiple subscribe attempts. |
| EndConsumerHelper | back to summary |
|---|---|
| private EndConsumerHelper() Utility class. | |
| composeMessage | back to summary |
|---|---|
| public static String composeMessage(String consumer) Builds the error message with the consumer class. | |
| reportDoubleSubscription | back to summary |
|---|---|
| public static void reportDoubleSubscription(Class<?> consumer) Report a ProtocolViolationException with a personalized message referencing the simple type name of the consumer class and report it via RxJavaPlugins.onError.
| |
| setOnce | back to summary |
|---|---|
| public static boolean setOnce(AtomicReference<Disposable> upstream, Disposable next, Class<?> observer) Atomically updates the target upstream AtomicReference from null to the non-null next Disposable, otherwise disposes next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared disposed indicator.
| |
| setOnce | back to summary |
|---|---|
| public static boolean setOnce(AtomicReference<Subscription> upstream, Subscription next, Class<?> subscriber) Atomically updates the target upstream AtomicReference from null to the non-null next Subscription, otherwise cancels next and reports a ProtocolViolationException if the AtomicReference doesn't contain the shared cancelled indicator.
| |
| validate | back to summary |
|---|---|
| public static boolean validate(Disposable upstream, Disposable next, Class<?> observer) Ensures that the upstream Disposable is null and returns true, otherwise disposes the next Disposable and if the upstream is not the shared disposed instance, reports a ProtocolViolationException due to multiple subscribe attempts.
| |
| validate | back to summary |
|---|---|
| public static boolean validate(Subscription upstream, Subscription next, Class<?> subscriber) Ensures that the upstream Subscription is null and returns true, otherwise cancels the next Subscription and if the upstream is not the shared cancelled instance, reports a ProtocolViolationException due to multiple subscribe attempts.
| |