public enum SubscriptionHelper extends java.lang.Enum<SubscriptionHelper>
| Modifier and Type | Method and Description |
|---|---|
static Consumer<org.reactivestreams.Subscription> |
consumeAndCancel()
Returns a consumer which calls cancel on the supplied Subscription.
|
static void |
reportDisposableSet()
Reports that the disposable is already set to the RxJavaPlugins error handler.
|
static void |
reportSubscriptionSet()
Reports that the subscription is already set to the RxJavaPlugins error handler.
|
static boolean |
validateDisposable(Disposable current,
Disposable next)
Verifies that current is null, next is not null, otherwise signals errors
to the RxJavaPlugins and returns true
|
static boolean |
validateRequest(long n)
Validates that the n is positive.
|
static boolean |
validateSubscription(org.reactivestreams.Subscription current,
org.reactivestreams.Subscription next)
Verifies that current is null, next is not null, otherwise signals errors
to the RxJavaPlugins and returns true
|
static SubscriptionHelper |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SubscriptionHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static SubscriptionHelper[] values()
for (SubscriptionHelper c : SubscriptionHelper.values()) System.out.println(c);
public static SubscriptionHelper valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static boolean validateSubscription(org.reactivestreams.Subscription current,
org.reactivestreams.Subscription next)
current - the current Subscription, expected to be nullnext - the next Subscription, expected to be non-nullpublic static void reportSubscriptionSet()
public static boolean validateDisposable(Disposable current, Disposable next)
current - the current Disposable, expected to be nullnext - the next Disposable, expected to be non-nullpublic static void reportDisposableSet()
public static boolean validateRequest(long n)
n - the request amountpublic static Consumer<org.reactivestreams.Subscription> consumeAndCancel()