123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210 |
- .class public final Lio/reactivex/internal/subscribers/BlockingSubscriber;
- .super Ljava/util/concurrent/atomic/AtomicReference;
- .source "BlockingSubscriber.java"
- # interfaces
- .implements Lorg/reactivestreams/Subscriber;
- .implements Lorg/reactivestreams/Subscription;
- # annotations
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "<T:",
- "Ljava/lang/Object;",
- ">",
- "Ljava/util/concurrent/atomic/AtomicReference<",
- "Lorg/reactivestreams/Subscription;",
- ">;",
- "Lorg/reactivestreams/Subscriber<",
- "TT;>;",
- "Lorg/reactivestreams/Subscription;"
- }
- .end annotation
- # static fields
- .field public static final TERMINATED:Ljava/lang/Object;
- .field private static final serialVersionUID:J = -0x43aae8bc09f84c1cL
- # instance fields
- .field final queue:Ljava/util/Queue;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/Queue<",
- "Ljava/lang/Object;",
- ">;"
- }
- .end annotation
- .end field
- # direct methods
- .method static constructor <clinit>()V
- .locals 1
- .line 28
- new-instance v0, Ljava/lang/Object;
- invoke-direct {v0}, Ljava/lang/Object;-><init>()V
- sput-object v0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->TERMINATED:Ljava/lang/Object;
- return-void
- .end method
- .method public constructor <init>(Ljava/util/Queue;)V
- .locals 0
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/Queue<",
- "Ljava/lang/Object;",
- ">;)V"
- }
- .end annotation
- .line 32
- invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
- .line 33
- iput-object p1, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- return-void
- .end method
- # virtual methods
- .method public cancel()V
- .locals 2
- .line 65
- invoke-static {p0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
- move-result v0
- if-eqz v0, :cond_0
- .line 66
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- sget-object v1, Lio/reactivex/internal/subscribers/BlockingSubscriber;->TERMINATED:Ljava/lang/Object;
- invoke-interface {v0, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
- :cond_0
- return-void
- .end method
- .method public isCancelled()Z
- .locals 2
- .line 71
- invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BlockingSubscriber;->get()Ljava/lang/Object;
- move-result-object v0
- sget-object v1, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/internal/subscriptions/SubscriptionHelper;
- if-ne v0, v1, :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method public onComplete()V
- .locals 2
- .line 55
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- invoke-static {}, Lio/reactivex/internal/util/NotificationLite;->complete()Ljava/lang/Object;
- move-result-object v1
- invoke-interface {v0, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
- return-void
- .end method
- .method public onError(Ljava/lang/Throwable;)V
- .locals 1
- .line 50
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- invoke-static {p1}, Lio/reactivex/internal/util/NotificationLite;->error(Ljava/lang/Throwable;)Ljava/lang/Object;
- move-result-object p1
- invoke-interface {v0, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
- return-void
- .end method
- .method public onNext(Ljava/lang/Object;)V
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(TT;)V"
- }
- .end annotation
- .line 45
- iget-object v0, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- invoke-static {p1}, Lio/reactivex/internal/util/NotificationLite;->next(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object p1
- invoke-interface {v0, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
- return-void
- .end method
- .method public onSubscribe(Lorg/reactivestreams/Subscription;)V
- .locals 1
- .line 38
- invoke-static {p0, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->setOnce(Ljava/util/concurrent/atomic/AtomicReference;Lorg/reactivestreams/Subscription;)Z
- move-result p1
- if-eqz p1, :cond_0
- .line 39
- iget-object p1, p0, Lio/reactivex/internal/subscribers/BlockingSubscriber;->queue:Ljava/util/Queue;
- invoke-static {p0}, Lio/reactivex/internal/util/NotificationLite;->subscription(Lorg/reactivestreams/Subscription;)Ljava/lang/Object;
- move-result-object v0
- invoke-interface {p1, v0}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
- :cond_0
- return-void
- .end method
- .method public request(J)V
- .locals 1
- .line 60
- invoke-virtual {p0}, Lio/reactivex/internal/subscribers/BlockingSubscriber;->get()Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Lorg/reactivestreams/Subscription;
- invoke-interface {v0, p1, p2}, Lorg/reactivestreams/Subscription;->request(J)V
- return-void
- .end method
|