本文整理汇总了Java中io.reactivex.internal.disposables.DisposableHelper类的典型用法代码示例。如果您正苦于以下问题:Java DisposableHelper类的具体用法?Java DisposableHelper怎么用?Java DisposableHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DisposableHelper类属于io.reactivex.internal.disposables包,在下文中一共展示了DisposableHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onError
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
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();
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:19,代码来源:AbstractDisposableAutoRelease.java
示例2: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable d) {
if (DisposableHelper.validate(this.d, d)) {
this.d = d;
actual.onSubscribe(this);
}
}
开发者ID:akaita,项目名称:RxJava2Debug,代码行数:9,代码来源:CompletableOnAssembly.java
示例3: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable d) {
if (DisposableHelper.validate(this.upstream, d)) {
this.upstream = d;
actual.onSubscribe(this);
}
}
开发者ID:akarnokd,项目名称:RxJava2Swing,代码行数:8,代码来源:SwingObserveOn.java
示例4: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable s) {
if (DisposableHelper.validate(this.s, s)) {
actual.onSubscribe(this);
if (actual instanceof Disposable) {
this.compositeDisposable.add((Disposable) actual);
} else {
this.compositeDisposable.add(this);
}
this.s = s;
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:13,代码来源:AttachDisposableCompletable.java
示例5: onError
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onError(Throwable t) {
if (s != DisposableHelper.DISPOSED) {
actual.onError(t);
} else {
RxJavaPlugins.onError(t);
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:9,代码来源:AttachDisposableCompletable.java
示例6: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable s) {
if (DisposableHelper.validate(this.s, s)) {
actual.onSubscribe(this);
if(actual instanceof Disposable) {
this.compositeDisposable.add((Disposable) actual);
} else {
this.compositeDisposable.add(this);
}
this.s = s;
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:13,代码来源:AttachDisposableObservable.java
示例7: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable s) {
if (DisposableHelper.validate(this.s, s)) {
actual.onSubscribe(this);
if(actual instanceof Disposable) {
this.compositeDisposable.add((Disposable) actual);
} else {
this.compositeDisposable.add(this);
}
this.s = s;
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:13,代码来源:AttachDisposableMaybe.java
示例8: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable s) {
if (DisposableHelper.validate(this.s, s)) {
actual.onSubscribe(this);
if(actual instanceof Disposable) {
this.compositeDisposable.add((Disposable) actual);
} else {
this.compositeDisposable.add(s);
}
this.s = s;
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:13,代码来源:AttachDisposableSingle.java
示例9: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable d) {
if (DisposableHelper.validate(this.d, d)) {
this.d = d;
if (disposed) {
d.dispose();
}
}
}
开发者ID:akarnokd,项目名称:RxJava2Jdk8Interop,代码行数:10,代码来源:ZeroOneIterator.java
示例10: onSubscribe
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onSubscribe(Disposable d) {
if (DisposableHelper.validate(this.d, d)) {
this.d = d;
actual.onSubscribe(this);
}
}
开发者ID:akarnokd,项目名称:RxJava2Jdk8Interop,代码行数:9,代码来源:MaybeMapOptional.java
示例11: onNext
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onNext(T t) {
if (get() != DisposableHelper.DISPOSED) {
try {
onNext.accept(t);
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
get().dispose();
onError(e);
}
}
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:13,代码来源:DisposableAutoReleaseObserver.java
示例12: onComplete
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
public final void onComplete() {
if (get() != DisposableHelper.DISPOSED) {
lazySet(DisposableHelper.DISPOSED);
try {
onComplete.run();
} catch (Throwable e) {
Exceptions.throwIfFatal(e);
RxJavaPlugins.onError(e);
}
}
removeSelf();
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:13,代码来源:AbstractDisposableAutoRelease.java
示例13: onSuccess
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@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);
}
}
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:13,代码来源:DisposableAutoReleaseMultiObserver.java
示例14: subscribeActual
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
protected void subscribeActual(Subscriber<? super Long> s) {
TimerSubscriber parent = new TimerSubscriber(s);
s.onSubscribe(parent);
Disposable d = scheduler.scheduleDirect(parent, delay, unit);
DisposableHelper.replace(parent.task, d);
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:9,代码来源:SoloTimer.java
示例15: subscribeActual
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
protected void subscribeActual(Subscriber<? super Void> s) {
TimerSubscription parent = new TimerSubscription(s);
s.onSubscribe(parent);
DisposableHelper.replace(parent, scheduler.scheduleDirect(parent, delay, unit));
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:8,代码来源:NonoTimer.java
示例16: subscribeActual
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
protected void subscribeActual(Subscriber<? super T> s) {
Worker worker = scheduler.createWorker();
SubscribeOnSubscriber<T> parent = new SubscribeOnSubscriber<T>(s, worker, source);
s.onSubscribe(parent);
DisposableHelper.replace(parent.task, worker.schedule(parent));
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:10,代码来源:SoloSubscribeOn.java
示例17: onSubscribeWithPermit
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
protected final void onSubscribeWithPermit(Disposable disposable) {
if (DisposableHelper.setOnce(this, disposable)) {
if (acquireCallPermit()) {
onSubscribeInner(this);
} else {
dispose();
onSubscribeInner(this);
permittedOnError(circuitBreakerOpenException());
}
}
}
开发者ID:resilience4j,项目名称:resilience4j,代码行数:12,代码来源:DisposableCircuitBreaker.java
示例18: onSubscribeWithPermit
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
protected final void onSubscribeWithPermit(Disposable disposable) {
if (DisposableHelper.setOnce(this, disposable)) {
if (acquireCallPermit()) {
onSubscribeInner(this);
} else {
dispose();
onSubscribeInner(this);
permittedOnError(bulkheadFullException());
}
}
}
开发者ID:resilience4j,项目名称:resilience4j,代码行数:12,代码来源:DisposableBulkhead.java
示例19: onComplete
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public void onComplete() {
if (s != DisposableHelper.DISPOSED) {
actual.onComplete();
}
}
开发者ID:cp949,项目名称:DisposableAttach,代码行数:7,代码来源:AttachDisposableObservable.java
示例20: isDisposed
import io.reactivex.internal.disposables.DisposableHelper; //导入依赖的package包/类
@Override
public boolean isDisposed() {
return DisposableHelper.isDisposed(safeObserver.get());
}
开发者ID:akarnokd,项目名称:RxJava2Extensions,代码行数:5,代码来源:JoinObserver1.java
注:本文中的io.reactivex.internal.disposables.DisposableHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论