BlockingObservable.smali
.class public final Lrx/observables/BlockingObservable;
.super Ljava/lang/Object;
.source "BlockingObservable.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# static fields
.field static final ON_START:Ljava/lang/Object;
.field static final SET_PRODUCER:Ljava/lang/Object;
.field static final UNSUBSCRIBE:Ljava/lang/Object;
# instance fields
.field private final o:Lrx/Observable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Observable<",
"+TT;>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
.line 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lrx/observables/BlockingObservable;->ON_START:Ljava/lang/Object;
.line 2
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lrx/observables/BlockingObservable;->SET_PRODUCER:Ljava/lang/Object;
.line 3
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lrx/observables/BlockingObservable;->UNSUBSCRIBE:Ljava/lang/Object;
return-void
.end method
.method private constructor <init>(Lrx/Observable;)V
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Observable<",
"+TT;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
return-void
.end method
.method private blockForSingle(Lrx/Observable;)Ljava/lang/Object;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Observable<",
"+TT;>;)TT;"
}
.end annotation
.line 1
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
.line 2
new-instance v1, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
.line 3
new-instance v2, Ljava/util/concurrent/CountDownLatch;
const/4 v3, 0x1
invoke-direct {v2, v3}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
.line 4
new-instance v3, Lrx/observables/BlockingObservable$3;
invoke-direct {v3, p0, v2, v1, v0}, Lrx/observables/BlockingObservable$3;-><init>(Lrx/observables/BlockingObservable;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicReference;)V
invoke-virtual {p1, v3}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
move-result-object p1
.line 5
invoke-static {v2, p1}, Lrx/internal/util/BlockingUtils;->awaitForComplete(Ljava/util/concurrent/CountDownLatch;Lrx/Subscription;)V
.line 6
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
if-nez p1, :cond_27
.line 7
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
return-object p1
.line 8
:cond_27
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Throwable;
invoke-static {p1}, Lrx/exceptions/Exceptions;->propagate(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
const/4 p1, 0x0
throw p1
.end method
.method public static from(Lrx/Observable;)Lrx/observables/BlockingObservable;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lrx/Observable<",
"+TT;>;)",
"Lrx/observables/BlockingObservable<",
"TT;>;"
}
.end annotation
.line 1
new-instance v0, Lrx/observables/BlockingObservable;
invoke-direct {v0, p0}, Lrx/observables/BlockingObservable;-><init>(Lrx/Observable;)V
return-object v0
.end method
# virtual methods
.method public first()Ljava/lang/Object;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0}, Lrx/Observable;->first()Lrx/Observable;
move-result-object v0
invoke-direct {p0, v0}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public first(Lrx/functions/Func1;)Ljava/lang/Object;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p1}, Lrx/Observable;->first(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public firstOrDefault(Ljava/lang/Object;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v1
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0, p1}, Lrx/Observable;->firstOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public firstOrDefault(Ljava/lang/Object;Lrx/functions/Func1;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p2}, Lrx/Observable;->filter(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v0
invoke-virtual {p2, v0}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-virtual {p2, p1}, Lrx/Observable;->firstOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public forEach(Lrx/functions/Action1;)V
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Action1<",
"-TT;>;)V"
}
.end annotation
.line 1
new-instance v0, Ljava/util/concurrent/CountDownLatch;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
.line 2
new-instance v1, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
.line 3
iget-object v2, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
new-instance v3, Lrx/observables/BlockingObservable$1;
invoke-direct {v3, p0, v0, v1, p1}, Lrx/observables/BlockingObservable$1;-><init>(Lrx/observables/BlockingObservable;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicReference;Lrx/functions/Action1;)V
invoke-virtual {v2, v3}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
move-result-object p1
.line 4
invoke-static {v0, p1}, Lrx/internal/util/BlockingUtils;->awaitForComplete(Ljava/util/concurrent/CountDownLatch;Lrx/Subscription;)V
.line 5
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
if-nez p1, :cond_20
return-void
.line 6
:cond_20
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Throwable;
invoke-static {p1}, Lrx/exceptions/Exceptions;->propagate(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
const/4 p1, 0x0
throw p1
.end method
.method public getIterator()Ljava/util/Iterator;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Iterator<",
"TT;>;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {v0}, Lrx/internal/operators/BlockingOperatorToIterator;->toIterator(Lrx/Observable;)Ljava/util/Iterator;
move-result-object v0
return-object v0
.end method
.method public last()Ljava/lang/Object;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0}, Lrx/Observable;->last()Lrx/Observable;
move-result-object v0
invoke-direct {p0, v0}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public last(Lrx/functions/Func1;)Ljava/lang/Object;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p1}, Lrx/Observable;->last(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public lastOrDefault(Ljava/lang/Object;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v1
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0, p1}, Lrx/Observable;->lastOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public lastOrDefault(Ljava/lang/Object;Lrx/functions/Func1;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p2}, Lrx/Observable;->filter(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v0
invoke-virtual {p2, v0}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-virtual {p2, p1}, Lrx/Observable;->lastOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public latest()Ljava/lang/Iterable;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/lang/Iterable<",
"TT;>;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {v0}, Lrx/internal/operators/BlockingOperatorLatest;->latest(Lrx/Observable;)Ljava/lang/Iterable;
move-result-object v0
return-object v0
.end method
.method public mostRecent(Ljava/lang/Object;)Ljava/lang/Iterable;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)",
"Ljava/lang/Iterable<",
"TT;>;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {v0, p1}, Lrx/internal/operators/BlockingOperatorMostRecent;->mostRecent(Lrx/Observable;Ljava/lang/Object;)Ljava/lang/Iterable;
move-result-object p1
return-object p1
.end method
.method public next()Ljava/lang/Iterable;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/lang/Iterable<",
"TT;>;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {v0}, Lrx/internal/operators/BlockingOperatorNext;->next(Lrx/Observable;)Ljava/lang/Iterable;
move-result-object v0
return-object v0
.end method
.method public single()Ljava/lang/Object;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0}, Lrx/Observable;->single()Lrx/Observable;
move-result-object v0
invoke-direct {p0, v0}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public single(Lrx/functions/Func1;)Ljava/lang/Object;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p1}, Lrx/Observable;->single(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public singleOrDefault(Ljava/lang/Object;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v1
invoke-virtual {v0, v1}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object v0
invoke-virtual {v0, p1}, Lrx/Observable;->singleOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public singleOrDefault(Ljava/lang/Object;Lrx/functions/Func1;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;",
"Lrx/functions/Func1<",
"-TT;",
"Ljava/lang/Boolean;",
">;)TT;"
}
.end annotation
.line 2
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v0, p2}, Lrx/Observable;->filter(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-static {}, Lrx/internal/util/UtilityFunctions;->identity()Lrx/functions/Func1;
move-result-object v0
invoke-virtual {p2, v0}, Lrx/Observable;->map(Lrx/functions/Func1;)Lrx/Observable;
move-result-object p2
invoke-virtual {p2, p1}, Lrx/Observable;->singleOrDefault(Ljava/lang/Object;)Lrx/Observable;
move-result-object p1
invoke-direct {p0, p1}, Lrx/observables/BlockingObservable;->blockForSingle(Lrx/Observable;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public subscribe()V
.registers 7
.line 1
new-instance v0, Ljava/util/concurrent/CountDownLatch;
const/4 v1, 0x1
invoke-direct {v0, v1}, Ljava/util/concurrent/CountDownLatch;-><init>(I)V
.line 2
new-array v1, v1, [Ljava/lang/Throwable;
const/4 v2, 0x0
const/4 v3, 0x0
aput-object v2, v1, v3
.line 3
iget-object v4, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
new-instance v5, Lrx/observables/BlockingObservable$4;
invoke-direct {v5, p0, v1, v0}, Lrx/observables/BlockingObservable$4;-><init>(Lrx/observables/BlockingObservable;[Ljava/lang/Throwable;Ljava/util/concurrent/CountDownLatch;)V
invoke-virtual {v4, v5}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
move-result-object v4
.line 4
invoke-static {v0, v4}, Lrx/internal/util/BlockingUtils;->awaitForComplete(Ljava/util/concurrent/CountDownLatch;Lrx/Subscription;)V
.line 5
aget-object v0, v1, v3
if-nez v0, :cond_1f
return-void
.line 6
:cond_1f
invoke-static {v0}, Lrx/exceptions/Exceptions;->propagate(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
throw v2
.end method
.method public subscribe(Lrx/Observer;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Observer<",
"-TT;>;)V"
}
.end annotation
.line 7
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
.line 8
iget-object v1, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
new-instance v2, Lrx/observables/BlockingObservable$5;
invoke-direct {v2, p0, v0}, Lrx/observables/BlockingObservable$5;-><init>(Lrx/observables/BlockingObservable;Ljava/util/concurrent/BlockingQueue;)V
invoke-virtual {v1, v2}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
move-result-object v1
.line 9
:cond_10
:try_start_10
invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->poll()Ljava/lang/Object;
move-result-object v2
if-nez v2, :cond_1a
.line 10
invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->take()Ljava/lang/Object;
move-result-object v2
.line 11
:cond_1a
invoke-static {p1, v2}, Lrx/internal/operators/NotificationLite;->accept(Lrx/Observer;Ljava/lang/Object;)Z
move-result v2
:try_end_1e
.catch Ljava/lang/InterruptedException; {:try_start_10 .. :try_end_1e} :catch_26
.catchall {:try_start_10 .. :try_end_1e} :catchall_24
if-eqz v2, :cond_10
.line 12
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
return-void
:catchall_24
move-exception p1
goto :goto_35
:catch_26
move-exception v0
.line 13
:try_start_27
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Thread;->interrupt()V
.line 14
invoke-interface {p1, v0}, Lrx/Observer;->onError(Ljava/lang/Throwable;)V
:try_end_31
.catchall {:try_start_27 .. :try_end_31} :catchall_24
.line 15
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
return-void
:goto_35
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
goto :goto_3a
:goto_39
throw p1
:goto_3a
goto :goto_39
.end method
.method public subscribe(Lrx/Subscriber;)V
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Subscriber<",
"-TT;>;)V"
}
.end annotation
.line 16
new-instance v0, Ljava/util/concurrent/LinkedBlockingQueue;
invoke-direct {v0}, Ljava/util/concurrent/LinkedBlockingQueue;-><init>()V
const/4 v1, 0x1
.line 17
new-array v1, v1, [Lrx/Producer;
const/4 v2, 0x0
const/4 v3, 0x0
aput-object v3, v1, v2
.line 18
new-instance v3, Lrx/observables/BlockingObservable$6;
invoke-direct {v3, p0, v0, v1}, Lrx/observables/BlockingObservable$6;-><init>(Lrx/observables/BlockingObservable;Ljava/util/concurrent/BlockingQueue;[Lrx/Producer;)V
.line 19
invoke-virtual {p1, v3}, Lrx/Subscriber;->add(Lrx/Subscription;)V
.line 20
new-instance v4, Lrx/observables/BlockingObservable$7;
invoke-direct {v4, p0, v0}, Lrx/observables/BlockingObservable$7;-><init>(Lrx/observables/BlockingObservable;Ljava/util/concurrent/BlockingQueue;)V
invoke-static {v4}, Lrx/subscriptions/Subscriptions;->create(Lrx/functions/Action0;)Lrx/Subscription;
move-result-object v4
invoke-virtual {p1, v4}, Lrx/Subscriber;->add(Lrx/Subscription;)V
.line 21
iget-object v4, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-virtual {v4, v3}, Lrx/Observable;->subscribe(Lrx/Subscriber;)Lrx/Subscription;
.line 22
:cond_25
:goto_25
:try_start_25
invoke-virtual {p1}, Lrx/Subscriber;->isUnsubscribed()Z
move-result v4
if-eqz v4, :cond_2c
goto :goto_5d
.line 23
:cond_2c
invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->poll()Ljava/lang/Object;
move-result-object v4
if-nez v4, :cond_36
.line 24
invoke-interface {v0}, Ljava/util/concurrent/BlockingQueue;->take()Ljava/lang/Object;
move-result-object v4
.line 25
:cond_36
invoke-virtual {p1}, Lrx/Subscriber;->isUnsubscribed()Z
move-result v5
if-nez v5, :cond_5d
sget-object v5, Lrx/observables/BlockingObservable;->UNSUBSCRIBE:Ljava/lang/Object;
if-ne v4, v5, :cond_41
goto :goto_5d
.line 26
:cond_41
sget-object v5, Lrx/observables/BlockingObservable;->ON_START:Ljava/lang/Object;
if-ne v4, v5, :cond_49
.line 27
invoke-virtual {p1}, Lrx/Subscriber;->onStart()V
goto :goto_25
.line 28
:cond_49
sget-object v5, Lrx/observables/BlockingObservable;->SET_PRODUCER:Ljava/lang/Object;
if-ne v4, v5, :cond_53
.line 29
aget-object v4, v1, v2
invoke-virtual {p1, v4}, Lrx/Subscriber;->setProducer(Lrx/Producer;)V
goto :goto_25
.line 30
:cond_53
invoke-static {p1, v4}, Lrx/internal/operators/NotificationLite;->accept(Lrx/Observer;Ljava/lang/Object;)Z
move-result v4
:try_end_57
.catch Ljava/lang/InterruptedException; {:try_start_25 .. :try_end_57} :catch_63
.catchall {:try_start_25 .. :try_end_57} :catchall_61
if-eqz v4, :cond_25
.line 31
invoke-virtual {v3}, Lrx/Subscriber;->unsubscribe()V
return-void
:cond_5d
:goto_5d
invoke-virtual {v3}, Lrx/Subscriber;->unsubscribe()V
goto :goto_6f
:catchall_61
move-exception p1
goto :goto_70
:catch_63
move-exception v0
.line 32
:try_start_64
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Thread;->interrupt()V
.line 33
invoke-interface {p1, v0}, Lrx/Observer;->onError(Ljava/lang/Throwable;)V
:try_end_6e
.catchall {:try_start_64 .. :try_end_6e} :catchall_61
goto :goto_5d
:goto_6f
return-void
.line 34
:goto_70
invoke-virtual {v3}, Lrx/Subscriber;->unsubscribe()V
goto :goto_75
:goto_74
throw p1
:goto_75
goto :goto_74
.end method
.method public subscribe(Lrx/functions/Action1;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Action1<",
"-TT;>;)V"
}
.end annotation
.line 35
new-instance v0, Lrx/observables/BlockingObservable$8;
invoke-direct {v0, p0}, Lrx/observables/BlockingObservable$8;-><init>(Lrx/observables/BlockingObservable;)V
invoke-static {}, Lrx/functions/Actions;->empty()Lrx/functions/Actions$EmptyAction;
move-result-object v1
invoke-virtual {p0, p1, v0, v1}, Lrx/observables/BlockingObservable;->subscribe(Lrx/functions/Action1;Lrx/functions/Action1;Lrx/functions/Action0;)V
return-void
.end method
.method public subscribe(Lrx/functions/Action1;Lrx/functions/Action1;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Action1<",
"-TT;>;",
"Lrx/functions/Action1<",
"-",
"Ljava/lang/Throwable;",
">;)V"
}
.end annotation
.line 36
invoke-static {}, Lrx/functions/Actions;->empty()Lrx/functions/Actions$EmptyAction;
move-result-object v0
invoke-virtual {p0, p1, p2, v0}, Lrx/observables/BlockingObservable;->subscribe(Lrx/functions/Action1;Lrx/functions/Action1;Lrx/functions/Action0;)V
return-void
.end method
.method public subscribe(Lrx/functions/Action1;Lrx/functions/Action1;Lrx/functions/Action0;)V
.registers 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/functions/Action1<",
"-TT;>;",
"Lrx/functions/Action1<",
"-",
"Ljava/lang/Throwable;",
">;",
"Lrx/functions/Action0;",
")V"
}
.end annotation
.line 37
new-instance v0, Lrx/observables/BlockingObservable$9;
invoke-direct {v0, p0, p1, p2, p3}, Lrx/observables/BlockingObservable$9;-><init>(Lrx/observables/BlockingObservable;Lrx/functions/Action1;Lrx/functions/Action1;Lrx/functions/Action0;)V
invoke-virtual {p0, v0}, Lrx/observables/BlockingObservable;->subscribe(Lrx/Observer;)V
return-void
.end method
.method public toFuture()Ljava/util/concurrent/Future;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/concurrent/Future<",
"TT;>;"
}
.end annotation
.line 1
iget-object v0, p0, Lrx/observables/BlockingObservable;->o:Lrx/Observable;
invoke-static {v0}, Lrx/internal/operators/BlockingOperatorToFuture;->toFuture(Lrx/Observable;)Ljava/util/concurrent/Future;
move-result-object v0
return-object v0
.end method
.method public toIterable()Ljava/lang/Iterable;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/lang/Iterable<",
"TT;>;"
}
.end annotation
.line 1
new-instance v0, Lrx/observables/BlockingObservable$2;
invoke-direct {v0, p0}, Lrx/observables/BlockingObservable$2;-><init>(Lrx/observables/BlockingObservable;)V
return-object v0
.end method