本文整理汇总了Java中io.reactivex.internal.disposables.DisposableHelper.DISPOSED属性的典型用法代码示例。如果您正苦于以下问题:Java DisposableHelper.DISPOSED属性的具体用法?Java DisposableHelper.DISPOSED怎么用?Java DisposableHelper.DISPOSED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类io.reactivex.internal.disposables.DisposableHelper
的用法示例。
在下文中一共展示了DisposableHelper.DISPOSED属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onError
public final void onError(Throwable t) {
if (get() != DisposableHelper.DISPOSED) {
lazySet(DisposableHelper.DISPOSED);
if (onError != null) {
try {
onError.accept(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(new CompositeException(t, e));
}
} else {
RxJavaPlugins.onError(new OnErrorNotImplementedException(t));
}
} else {
RxJavaPlugins.onError(t);
}
removeSelf();
}
示例2: onError
@Override
public void onError(Throwable t) {
if (s != DisposableHelper.DISPOSED) {
actual.onError(t);
} else {
RxJavaPlugins.onError(t);
}
}
示例3: onNext
@Override
public void onNext(T t) {
if (get() != DisposableHelper.DISPOSED) {
try {
onNext.accept(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
get().dispose();
onError(e);
}
}
}
示例4: onComplete
public final void onComplete() {
if (get() != DisposableHelper.DISPOSED) {
lazySet(DisposableHelper.DISPOSED);
try {
onComplete.run();
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(e);
}
}
removeSelf();
}
示例5: onSuccess
@Override
public void onSuccess(T t) {
if (get() != DisposableHelper.DISPOSED) {
lazySet(DisposableHelper.DISPOSED);
try {
onSuccess.accept(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(e);
}
}
}
示例6: onComplete
@Override
public void onComplete() {
if (s != DisposableHelper.DISPOSED) {
actual.onComplete();
}
}
示例7: onError
@Override
public void onError(Throwable e) {
d = DisposableHelper.DISPOSED;
actual.onError(e);
}
示例8: cancel
@Override
public void cancel() {
cancelled = true;
d.dispose();
d = DisposableHelper.DISPOSED;
}
示例9: dispose
@Override
public void dispose() {
cancelled = true;
d.dispose();
d = DisposableHelper.DISPOSED;
}