p.smali
.class public final Lokhttp3/internal/http2/p;
.super Ljava/lang/Object;
.source "Http2Stream.java"
# static fields
.field static final synthetic $assertionsDisabled:Z
# instance fields
.field final bXL:Lokhttp3/internal/http2/h;
.field bYk:Z
.field final bYl:Lokhttp3/internal/http2/r;
.field final bYm:Lokhttp3/internal/http2/q;
.field final bYn:Lokhttp3/internal/http2/s;
.field final bYo:Lokhttp3/internal/http2/s;
.field byB:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<",
"Lokhttp3/internal/http2/a;",
">;"
}
.end annotation
.end field
.field byb:J
.field byc:J
.field errorCode:Lokhttp3/internal/http2/ErrorCode;
.field final id:I
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 32
const-class v0, Lokhttp3/internal/http2/p;
invoke-virtual {v0}, Ljava/lang/Class;->desiredAssertionStatus()Z
move-result v0
if-nez v0, :cond_c
const/4 v0, 0x1
:goto_9
sput-boolean v0, Lokhttp3/internal/http2/p;->$assertionsDisabled:Z
return-void
:cond_c
const/4 v0, 0x0
goto :goto_9
.end method
.method constructor <init>(ILokhttp3/internal/http2/h;ZZLjava/util/List;)V
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(I",
"Lokhttp3/internal/http2/h;",
"ZZ",
"Ljava/util/List",
"<",
"Lokhttp3/internal/http2/a;",
">;)V"
}
.end annotation
.prologue
.line 76
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 41
const-wide/16 v0, 0x0
iput-wide v0, p0, Lokhttp3/internal/http2/p;->byb:J
.line 65
new-instance v0, Lokhttp3/internal/http2/s;
invoke-direct {v0, p0}, Lokhttp3/internal/http2/s;-><init>(Lokhttp3/internal/http2/p;)V
iput-object v0, p0, Lokhttp3/internal/http2/p;->bYn:Lokhttp3/internal/http2/s;
.line 66
new-instance v0, Lokhttp3/internal/http2/s;
invoke-direct {v0, p0}, Lokhttp3/internal/http2/s;-><init>(Lokhttp3/internal/http2/p;)V
iput-object v0, p0, Lokhttp3/internal/http2/p;->bYo:Lokhttp3/internal/http2/s;
.line 73
const/4 v0, 0x0
iput-object v0, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 77
if-nez p2, :cond_22
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "connection == null"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
.line 78
:cond_22
if-nez p5, :cond_2c
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "requestHeaders == null"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
.line 79
:cond_2c
iput p1, p0, Lokhttp3/internal/http2/p;->id:I
.line 80
iput-object p2, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
.line 81
iget-object v0, p2, Lokhttp3/internal/http2/h;->bXU:Lokhttp3/internal/http2/x;
.line 82
invoke-virtual {v0}, Lokhttp3/internal/http2/x;->RW()I
move-result v0
int-to-long v0, v0
iput-wide v0, p0, Lokhttp3/internal/http2/p;->byc:J
.line 83
new-instance v0, Lokhttp3/internal/http2/r;
iget-object v1, p2, Lokhttp3/internal/http2/h;->bXT:Lokhttp3/internal/http2/x;
invoke-virtual {v1}, Lokhttp3/internal/http2/x;->RW()I
move-result v1
int-to-long v2, v1
invoke-direct {v0, p0, v2, v3}, Lokhttp3/internal/http2/r;-><init>(Lokhttp3/internal/http2/p;J)V
iput-object v0, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
.line 84
new-instance v0, Lokhttp3/internal/http2/q;
invoke-direct {v0, p0}, Lokhttp3/internal/http2/q;-><init>(Lokhttp3/internal/http2/p;)V
iput-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
.line 85
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iput-boolean p4, v0, Lokhttp3/internal/http2/r;->byI:Z
.line 86
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iput-boolean p3, v0, Lokhttp3/internal/http2/q;->byI:Z
.line 88
return-void
.end method
.method private d(Lokhttp3/internal/http2/ErrorCode;)Z
.registers 4
.prologue
const/4 v0, 0x0
.line 242
sget-boolean v1, Lokhttp3/internal/http2/p;->$assertionsDisabled:Z
if-nez v1, :cond_11
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_11
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 243
:cond_11
monitor-enter p0
.line 244
:try_start_12
iget-object v1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-eqz v1, :cond_18
.line 245
monitor-exit p0
.line 254
:goto_17
return v0
.line 247
:cond_18
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iget-boolean v1, v1, Lokhttp3/internal/http2/r;->byI:Z
if-eqz v1, :cond_29
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v1, v1, Lokhttp3/internal/http2/q;->byI:Z
if-eqz v1, :cond_29
.line 248
monitor-exit p0
goto :goto_17
.line 252
:catchall_26
move-exception v0
monitor-exit p0
:try_end_28
.catchall {:try_start_12 .. :try_end_28} :catchall_26
throw v0
.line 250
:cond_29
:try_start_29
iput-object p1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 251
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 252
monitor-exit p0
:try_end_2f
.catchall {:try_start_29 .. :try_end_2f} :catchall_26
.line 253
iget-object v0, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget v1, p0, Lokhttp3/internal/http2/p;->id:I
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/h;->fs(I)Lokhttp3/internal/http2/p;
.line 254
const/4 v0, 0x1
goto :goto_17
.end method
# virtual methods
.method public final Hr()Z
.registers 5
.prologue
const/4 v2, 0x0
const/4 v1, 0x1
.line 119
iget v0, p0, Lokhttp3/internal/http2/p;->id:I
and-int/lit8 v0, v0, 0x1
if-ne v0, v1, :cond_10
move v0, v1
.line 120
:goto_9
iget-object v3, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget-boolean v3, v3, Lokhttp3/internal/http2/h;->bxT:Z
if-ne v3, v0, :cond_12
:goto_f
return v1
:cond_10
move v0, v2
.line 119
goto :goto_9
:cond_12
move v1, v2
.line 120
goto :goto_f
.end method
.method public final Ht()Lokio/r;
.registers 3
.prologue
.line 210
monitor-enter p0
.line 211
:try_start_1
iget-boolean v0, p0, Lokhttp3/internal/http2/p;->bYk:Z
if-nez v0, :cond_16
invoke-virtual {p0}, Lokhttp3/internal/http2/p;->Hr()Z
move-result v0
if-nez v0, :cond_16
.line 212
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "reply before requesting the sink"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.line 214
:catchall_13
move-exception v0
monitor-exit p0
:try_end_15
.catchall {:try_start_1 .. :try_end_15} :catchall_13
throw v0
:cond_16
:try_start_16
monitor-exit p0
:try_end_17
.catchall {:try_start_16 .. :try_end_17} :catchall_13
.line 215
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
return-object v0
.end method
.method final Hu()V
.registers 3
.prologue
.line 285
sget-boolean v0, Lokhttp3/internal/http2/p;->$assertionsDisabled:Z
if-nez v0, :cond_10
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 287
:cond_10
monitor-enter p0
.line 288
:try_start_11
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
const/4 v1, 0x1
iput-boolean v1, v0, Lokhttp3/internal/http2/r;->byI:Z
.line 289
invoke-virtual {p0}, Lokhttp3/internal/http2/p;->isOpen()Z
move-result v0
.line 290
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 291
monitor-exit p0
:try_end_1e
.catchall {:try_start_11 .. :try_end_1e} :catchall_28
.line 292
if-nez v0, :cond_27
.line 293
iget-object v0, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget v1, p0, Lokhttp3/internal/http2/p;->id:I
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/h;->fs(I)Lokhttp3/internal/http2/p;
.line 295
:cond_27
return-void
.line 291
:catchall_28
move-exception v0
:try_start_29
monitor-exit p0
:try_end_2a
.catchall {:try_start_29 .. :try_end_2a} :catchall_28
throw v0
.end method
.method final Hv()V
.registers 2
.prologue
.line 577
:try_start_0
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_3
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_3} :catch_4
.line 580
return-void
.line 579
:catch_4
move-exception v0
new-instance v0, Ljava/io/InterruptedIOException;
invoke-direct {v0}, Ljava/io/InterruptedIOException;-><init>()V
throw v0
.end method
.method final I(J)V
.registers 6
.prologue
.line 557
iget-wide v0, p0, Lokhttp3/internal/http2/p;->byc:J
add-long/2addr v0, p1
iput-wide v0, p0, Lokhttp3/internal/http2/p;->byc:J
.line 558
const-wide/16 v0, 0x0
cmp-long v0, p1, v0
if-lez v0, :cond_e
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
.line 559
:cond_e
return-void
.end method
.method public final declared-synchronized RR()Ljava/util/List;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List",
"<",
"Lokhttp3/internal/http2/a;",
">;"
}
.end annotation
.prologue
.line 137
monitor-enter p0
:try_start_1
invoke-virtual {p0}, Lokhttp3/internal/http2/p;->Hr()Z
move-result v0
if-nez v0, :cond_12
.line 138
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "servers cannot read response headers"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_f
.catchall {:try_start_1 .. :try_end_f} :catchall_f
.line 137
:catchall_f
move-exception v0
monitor-exit p0
throw v0
.line 140
:cond_12
:try_start_12
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYn:Lokhttp3/internal/http2/s;
invoke-virtual {v0}, Lokhttp3/internal/http2/s;->enter()V
:try_end_17
.catchall {:try_start_12 .. :try_end_17} :catchall_f
.line 142
:goto_17
:try_start_17
iget-object v0, p0, Lokhttp3/internal/http2/p;->byB:Ljava/util/List;
if-nez v0, :cond_2a
iget-object v0, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-nez v0, :cond_2a
.line 143
invoke-virtual {p0}, Lokhttp3/internal/http2/p;->Hv()V
:try_end_22
.catchall {:try_start_17 .. :try_end_22} :catchall_23
goto :goto_17
.line 146
:catchall_23
move-exception v0
:try_start_24
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYn:Lokhttp3/internal/http2/s;
invoke-virtual {v1}, Lokhttp3/internal/http2/s;->Hy()V
throw v0
:cond_2a
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYn:Lokhttp3/internal/http2/s;
invoke-virtual {v0}, Lokhttp3/internal/http2/s;->Hy()V
.line 148
iget-object v0, p0, Lokhttp3/internal/http2/p;->byB:Ljava/util/List;
.line 149
if-eqz v0, :cond_38
.line 150
const/4 v1, 0x0
iput-object v1, p0, Lokhttp3/internal/http2/p;->byB:Ljava/util/List;
:try_end_36
.catchall {:try_start_24 .. :try_end_36} :catchall_f
.line 151
monitor-exit p0
return-object v0
.line 153
:cond_38
:try_start_38
new-instance v0, Lokhttp3/internal/http2/StreamResetException;
iget-object v1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
throw v0
:try_end_40
.catchall {:try_start_38 .. :try_end_40} :catchall_f
.end method
.method final RS()V
.registers 3
.prologue
.line 442
sget-boolean v0, Lokhttp3/internal/http2/p;->$assertionsDisabled:Z
if-nez v0, :cond_10
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_10
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
.line 445
:cond_10
monitor-enter p0
.line 446
:try_start_11
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iget-boolean v0, v0, Lokhttp3/internal/http2/r;->byI:Z
if-nez v0, :cond_37
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iget-boolean v0, v0, Lokhttp3/internal/http2/r;->closed:Z
if-eqz v0, :cond_37
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v0, v0, Lokhttp3/internal/http2/q;->byI:Z
if-nez v0, :cond_29
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v0, v0, Lokhttp3/internal/http2/q;->closed:Z
if-eqz v0, :cond_37
:cond_29
const/4 v0, 0x1
.line 447
:goto_2a
invoke-virtual {p0}, Lokhttp3/internal/http2/p;->isOpen()Z
move-result v1
.line 448
monitor-exit p0
:try_end_2f
.catchall {:try_start_11 .. :try_end_2f} :catchall_39
.line 449
if-eqz v0, :cond_3c
.line 454
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {p0, v0}, Lokhttp3/internal/http2/p;->b(Lokhttp3/internal/http2/ErrorCode;)V
.line 458
:cond_36
:goto_36
return-void
.line 446
:cond_37
const/4 v0, 0x0
goto :goto_2a
.line 448
:catchall_39
move-exception v0
:try_start_3a
monitor-exit p0
:try_end_3b
.catchall {:try_start_3a .. :try_end_3b} :catchall_39
throw v0
.line 455
:cond_3c
if-nez v1, :cond_36
.line 456
iget-object v0, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget v1, p0, Lokhttp3/internal/http2/p;->id:I
invoke-virtual {v0, v1}, Lokhttp3/internal/http2/h;->fs(I)Lokhttp3/internal/http2/p;
goto :goto_36
.end method
.method final RT()V
.registers 3
.prologue
.line 562
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v0, v0, Lokhttp3/internal/http2/q;->closed:Z
if-eqz v0, :cond_e
.line 563
new-instance v0, Ljava/io/IOException;
const-string v1, "stream closed"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 564
:cond_e
iget-object v0, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v0, v0, Lokhttp3/internal/http2/q;->byI:Z
if-eqz v0, :cond_1c
.line 565
new-instance v0, Ljava/io/IOException;
const-string v1, "stream finished"
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
.line 566
:cond_1c
iget-object v0, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-eqz v0, :cond_28
.line 567
new-instance v0, Lokhttp3/internal/http2/StreamResetException;
iget-object v1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
throw v0
.line 569
:cond_28
return-void
.end method
.method public final b(Lokhttp3/internal/http2/ErrorCode;)V
.registers 4
.prologue
.line 223
invoke-direct {p0, p1}, Lokhttp3/internal/http2/p;->d(Lokhttp3/internal/http2/ErrorCode;)Z
move-result v0
if-nez v0, :cond_7
.line 227
:goto_6
return-void
.line 226
:cond_7
iget-object v0, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget v1, p0, Lokhttp3/internal/http2/p;->id:I
invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/h;->b(ILokhttp3/internal/http2/ErrorCode;)V
goto :goto_6
.end method
.method public final c(Lokhttp3/internal/http2/ErrorCode;)V
.registers 4
.prologue
.line 234
invoke-direct {p0, p1}, Lokhttp3/internal/http2/p;->d(Lokhttp3/internal/http2/ErrorCode;)Z
move-result v0
if-nez v0, :cond_7
.line 238
:goto_6
return-void
.line 237
:cond_7
iget-object v0, p0, Lokhttp3/internal/http2/p;->bXL:Lokhttp3/internal/http2/h;
iget v1, p0, Lokhttp3/internal/http2/p;->id:I
invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/h;->a(ILokhttp3/internal/http2/ErrorCode;)V
goto :goto_6
.end method
.method final declared-synchronized e(Lokhttp3/internal/http2/ErrorCode;)V
.registers 3
.prologue
.line 298
monitor-enter p0
:try_start_1
iget-object v0, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
if-nez v0, :cond_a
.line 299
iput-object p1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
.line 300
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_a
.catchall {:try_start_1 .. :try_end_a} :catchall_c
.line 302
:cond_a
monitor-exit p0
return-void
.line 298
:catchall_c
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized isOpen()Z
.registers 3
.prologue
const/4 v0, 0x0
.line 106
monitor-enter p0
:try_start_2
iget-object v1, p0, Lokhttp3/internal/http2/p;->errorCode:Lokhttp3/internal/http2/ErrorCode;
:try_end_4
.catchall {:try_start_2 .. :try_end_4} :catchall_26
if-eqz v1, :cond_8
.line 114
:cond_6
:goto_6
monitor-exit p0
return v0
.line 109
:cond_8
:try_start_8
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iget-boolean v1, v1, Lokhttp3/internal/http2/r;->byI:Z
if-nez v1, :cond_14
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYl:Lokhttp3/internal/http2/r;
iget-boolean v1, v1, Lokhttp3/internal/http2/r;->closed:Z
if-eqz v1, :cond_24
:cond_14
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v1, v1, Lokhttp3/internal/http2/q;->byI:Z
if-nez v1, :cond_20
iget-object v1, p0, Lokhttp3/internal/http2/p;->bYm:Lokhttp3/internal/http2/q;
iget-boolean v1, v1, Lokhttp3/internal/http2/q;->closed:Z
if-eqz v1, :cond_24
:cond_20
iget-boolean v1, p0, Lokhttp3/internal/http2/p;->bYk:Z
:try_end_22
.catchall {:try_start_8 .. :try_end_22} :catchall_26
if-nez v1, :cond_6
.line 114
:cond_24
const/4 v0, 0x1
goto :goto_6
.line 106
:catchall_26
move-exception v0
monitor-exit p0
throw v0
.end method