Http2Connection$ReaderRunnable.smali
.class Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;
.super Lokhttp3/internal/NamedRunnable;
.source "Http2Connection.java"
# interfaces
.implements Lokhttp3/internal/http2/Http2Reader$Handler;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/http2/Http2Connection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = "ReaderRunnable"
.end annotation
# instance fields
.field final reader:Lokhttp3/internal/http2/Http2Reader;
.field final synthetic this$0:Lokhttp3/internal/http2/Http2Connection;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lokhttp3/internal/http2/Http2Connection;Lokhttp3/internal/http2/Http2Reader;)V
.registers 6
.param p1, "this$0" # Lokhttp3/internal/http2/Http2Connection;
.param p2, "reader" # Lokhttp3/internal/http2/Http2Reader;
.line 599
iput-object p1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
.line 600
const/4 v0, 0x1
new-array v0, v0, [Ljava/lang/Object;
iget-object v1, p1, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
const/4 v2, 0x0
aput-object v1, v0, v2
const-string v1, "OkHttp %s"
invoke-direct {p0, v1, v0}, Lokhttp3/internal/NamedRunnable;-><init>(Ljava/lang/String;[Ljava/lang/Object;)V
.line 601
iput-object p2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->reader:Lokhttp3/internal/http2/Http2Reader;
.line 602
return-void
.end method
.method private applyAndAckSettings(Lokhttp3/internal/http2/Settings;)V
.registers 8
.param p1, "peerSettings" # Lokhttp3/internal/http2/Settings;
.line 737
:try_start_0
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-static {v0}, Lokhttp3/internal/http2/Http2Connection;->access$200(Lokhttp3/internal/http2/Http2Connection;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
new-instance v1, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$3;
const-string v2, "OkHttp %s ACK Settings"
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
iget-object v5, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v5, v5, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v5, v3, v4
invoke-direct {v1, p0, v2, v3, p1}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$3;-><init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;Lokhttp3/internal/http2/Settings;)V
invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
:try_end_1a
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_0 .. :try_end_1a} :catch_1b
.line 748
goto :goto_1c
.line 746
:catch_1b
move-exception v0
.line 749
:goto_1c
return-void
.end method
# virtual methods
.method public ackSettings()V
.registers 1
.line 753
return-void
.end method
.method public alternateService(ILjava/lang/String;Lokio/ByteString;Ljava/lang/String;IJ)V
.registers 8
.param p1, "streamId" # I
.param p2, "origin" # Ljava/lang/String;
.param p3, "protocol" # Lokio/ByteString;
.param p4, "host" # Ljava/lang/String;
.param p5, "port" # I
.param p6, "maxAge" # J
.line 820
return-void
.end method
.method public data(ZILokio/BufferedSource;I)V
.registers 9
.param p1, "inFinished" # Z
.param p2, "streamId" # I
.param p3, "source" # Lokio/BufferedSource;
.param p4, "length" # I
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 627
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2}, Lokhttp3/internal/http2/Http2Connection;->pushedStream(I)Z
move-result v0
if-eqz v0, :cond_e
.line 628
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2, p3, p4, p1}, Lokhttp3/internal/http2/Http2Connection;->pushDataLater(ILokio/BufferedSource;IZ)V
.line 629
return-void
.line 631
:cond_e
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2}, Lokhttp3/internal/http2/Http2Connection;->getStream(I)Lokhttp3/internal/http2/Http2Stream;
move-result-object v0
.line 632
.local v0, "dataStream":Lokhttp3/internal/http2/Http2Stream;
if-nez v0, :cond_28
.line 633
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
sget-object v2, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v1, p2, v2}, Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.line 634
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
int-to-long v2, p4
invoke-virtual {v1, v2, v3}, Lokhttp3/internal/http2/Http2Connection;->updateConnectionFlowControl(J)V
.line 635
int-to-long v1, p4
invoke-interface {p3, v1, v2}, Lokio/BufferedSource;->skip(J)V
.line 636
return-void
.line 638
:cond_28
invoke-virtual {v0, p3, p4}, Lokhttp3/internal/http2/Http2Stream;->receiveData(Lokio/BufferedSource;I)V
.line 639
if-eqz p1, :cond_30
.line 640
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream;->receiveFin()V
.line 642
:cond_30
return-void
.end method
.method protected execute()V
.registers 5
.line 605
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 606
.local v0, "connectionErrorCode":Lokhttp3/internal/http2/ErrorCode;
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->INTERNAL_ERROR:Lokhttp3/internal/http2/ErrorCode;
.line 608
.local v1, "streamErrorCode":Lokhttp3/internal/http2/ErrorCode;
:try_start_4
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->reader:Lokhttp3/internal/http2/Http2Reader;
invoke-virtual {v2, p0}, Lokhttp3/internal/http2/Http2Reader;->readConnectionPreface(Lokhttp3/internal/http2/Http2Reader$Handler;)V
.line 609
:goto_9
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->reader:Lokhttp3/internal/http2/Http2Reader;
const/4 v3, 0x0
invoke-virtual {v2, v3, p0}, Lokhttp3/internal/http2/Http2Reader;->nextFrame(ZLokhttp3/internal/http2/Http2Reader$Handler;)Z
move-result v2
if-eqz v2, :cond_13
goto :goto_9
.line 611
:cond_13
sget-object v2, Lokhttp3/internal/http2/ErrorCode;->NO_ERROR:Lokhttp3/internal/http2/ErrorCode;
move-object v0, v2
.line 612
sget-object v2, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
:try_end_18
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_18} :catch_23
.catchall {:try_start_4 .. :try_end_18} :catchall_21
move-object v1, v2
.line 618
:try_start_19
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v2, v0, v1}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
:try_end_1e
.catch Ljava/io/IOException; {:try_start_19 .. :try_end_1e} :catch_1f
goto :goto_2f
.line 619
:catch_1f
move-exception v2
goto :goto_31
.line 617
:catchall_21
move-exception v2
goto :goto_38
.line 613
:catch_23
move-exception v2
.line 614
.local v2, "e":Ljava/io/IOException;
:try_start_24
sget-object v3, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
move-object v0, v3
.line 615
sget-object v3, Lokhttp3/internal/http2/ErrorCode;->PROTOCOL_ERROR:Lokhttp3/internal/http2/ErrorCode;
:try_end_29
.catchall {:try_start_24 .. :try_end_29} :catchall_21
move-object v1, v3
.line 618
.end local v2 # "e":Ljava/io/IOException;
:try_start_2a
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v2, v0, v1}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
:try_end_2f
.catch Ljava/io/IOException; {:try_start_2a .. :try_end_2f} :catch_30
.line 620
:goto_2f
goto :goto_31
.line 619
:catch_30
move-exception v2
.line 621
:goto_31
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->reader:Lokhttp3/internal/http2/Http2Reader;
invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
.line 622
nop
.line 623
return-void
.line 618
:goto_38
:try_start_38
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v3, v0, v1}, Lokhttp3/internal/http2/Http2Connection;->close(Lokhttp3/internal/http2/ErrorCode;Lokhttp3/internal/http2/ErrorCode;)V
:try_end_3d
.catch Ljava/io/IOException; {:try_start_38 .. :try_end_3d} :catch_3e
.line 620
goto :goto_3f
.line 619
:catch_3e
move-exception v3
.line 621
:goto_3f
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->reader:Lokhttp3/internal/http2/Http2Reader;
invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
goto :goto_46
:goto_45
throw v2
:goto_46
goto :goto_45
.end method
.method public goAway(ILokhttp3/internal/http2/ErrorCode;Lokio/ByteString;)V
.registers 10
.param p1, "lastGoodStreamId" # I
.param p2, "errorCode" # Lokhttp3/internal/http2/ErrorCode;
.param p3, "debugData" # Lokio/ByteString;
.line 772
invoke-virtual {p3}, Lokio/ByteString;->size()I
.line 777
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
monitor-enter v0
.line 778
:try_start_6
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v1, v1, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v1
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v2, v2, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v2}, Ljava/util/Map;->size()I
move-result v2
new-array v2, v2, [Lokhttp3/internal/http2/Http2Stream;
invoke-interface {v1, v2}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v1
check-cast v1, [Lokhttp3/internal/http2/Http2Stream;
.line 779
.local v1, "streamsCopy":[Lokhttp3/internal/http2/Http2Stream;
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v3, 0x1
iput-boolean v3, v2, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
.line 780
monitor-exit v0
:try_end_24
.catchall {:try_start_6 .. :try_end_24} :catchall_48
.line 783
array-length v0, v1
const/4 v2, 0x0
:goto_26
if-ge v2, v0, :cond_47
aget-object v3, v1, v2
.line 784
.local v3, "http2Stream":Lokhttp3/internal/http2/Http2Stream;
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream;->getId()I
move-result v4
if-le v4, p1, :cond_44
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
move-result v4
if-eqz v4, :cond_44
.line 785
sget-object v4, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
invoke-virtual {v3, v4}, Lokhttp3/internal/http2/Http2Stream;->receiveRstStream(Lokhttp3/internal/http2/ErrorCode;)V
.line 786
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v3}, Lokhttp3/internal/http2/Http2Stream;->getId()I
move-result v5
invoke-virtual {v4, v5}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
.line 783
.end local v3 # "http2Stream":Lokhttp3/internal/http2/Http2Stream;
:cond_44
add-int/lit8 v2, v2, 0x1
goto :goto_26
.line 789
:cond_47
return-void
.line 780
.end local v1 # "streamsCopy":[Lokhttp3/internal/http2/Http2Stream;
:catchall_48
move-exception v1
:try_start_49
monitor-exit v0
:try_end_4a
.catchall {:try_start_49 .. :try_end_4a} :catchall_48
goto :goto_4c
:goto_4b
throw v1
:goto_4c
goto :goto_4b
.end method
.method public headers(ZIILjava/util/List;)V
.registers 16
.param p1, "inFinished" # Z
.param p2, "streamId" # I
.param p3, "associatedStreamId" # I
.annotation system Ldalvik/annotation/Signature;
value = {
"(ZII",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;)V"
}
.end annotation
.line 646
.local p4, "headerBlock":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/http2/Header;>;"
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2}, Lokhttp3/internal/http2/Http2Connection;->pushedStream(I)Z
move-result v0
if-eqz v0, :cond_e
.line 647
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2, p4, p1}, Lokhttp3/internal/http2/Http2Connection;->pushHeadersLater(ILjava/util/List;Z)V
.line 648
return-void
.line 651
:cond_e
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
monitor-enter v0
.line 652
:try_start_11
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v1, p2}, Lokhttp3/internal/http2/Http2Connection;->getStream(I)Lokhttp3/internal/http2/Http2Stream;
move-result-object v1
.line 654
.local v1, "stream":Lokhttp3/internal/http2/Http2Stream;
if-nez v1, :cond_70
.line 656
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-boolean v2, v2, Lokhttp3/internal/http2/Http2Connection;->shutdown:Z
if-eqz v2, :cond_21
monitor-exit v0
return-void
.line 659
:cond_21
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget v2, v2, Lokhttp3/internal/http2/Http2Connection;->lastGoodStreamId:I
if-gt p2, v2, :cond_29
monitor-exit v0
return-void
.line 662
:cond_29
rem-int/lit8 v2, p2, 0x2
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget v3, v3, Lokhttp3/internal/http2/Http2Connection;->nextStreamId:I
const/4 v4, 0x2
rem-int/2addr v3, v4
if-ne v2, v3, :cond_35
monitor-exit v0
return-void
.line 665
:cond_35
new-instance v2, Lokhttp3/internal/http2/Http2Stream;
iget-object v7, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v8, 0x0
move-object v5, v2
move v6, p2
move v9, p1
move-object v10, p4
invoke-direct/range {v5 .. v10}, Lokhttp3/internal/http2/Http2Stream;-><init>(ILokhttp3/internal/http2/Http2Connection;ZZLjava/util/List;)V
.line 667
.local v2, "newStream":Lokhttp3/internal/http2/Http2Stream;
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput p2, v3, Lokhttp3/internal/http2/Http2Connection;->lastGoodStreamId:I
.line 668
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v3, v3, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v5
invoke-interface {v3, v5, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 669
invoke-static {}, Lokhttp3/internal/http2/Http2Connection;->access$100()Ljava/util/concurrent/ExecutorService;
move-result-object v3
new-instance v5, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;
const-string v6, "OkHttp %s stream %d"
new-array v4, v4, [Ljava/lang/Object;
const/4 v7, 0x0
iget-object v8, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v8, v8, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
aput-object v8, v4, v7
const/4 v7, 0x1
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v8
aput-object v8, v4, v7
invoke-direct {v5, p0, v6, v4, v2}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$1;-><init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;Lokhttp3/internal/http2/Http2Stream;)V
invoke-interface {v3, v5}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
.line 682
monitor-exit v0
return-void
.line 684
.end local v2 # "newStream":Lokhttp3/internal/http2/Http2Stream;
:cond_70
monitor-exit v0
:try_end_71
.catchall {:try_start_11 .. :try_end_71} :catchall_7a
.line 687
invoke-virtual {v1, p4}, Lokhttp3/internal/http2/Http2Stream;->receiveHeaders(Ljava/util/List;)V
.line 688
if-eqz p1, :cond_79
invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream;->receiveFin()V
.line 689
:cond_79
return-void
.line 684
.end local v1 # "stream":Lokhttp3/internal/http2/Http2Stream;
:catchall_7a
move-exception v1
:try_start_7b
monitor-exit v0
:try_end_7c
.catchall {:try_start_7b .. :try_end_7c} :catchall_7a
throw v1
.end method
.method public ping(ZII)V
.registers 8
.param p1, "reply" # Z
.param p2, "payload1" # I
.param p3, "payload2" # I
.line 756
if-eqz p1, :cond_15
.line 757
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
monitor-enter v0
.line 758
:try_start_5
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v2, 0x0
invoke-static {v1, v2}, Lokhttp3/internal/http2/Http2Connection;->access$302(Lokhttp3/internal/http2/Http2Connection;Z)Z
.line 759
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V
.line 760
monitor-exit v0
goto :goto_28
:catchall_12
move-exception v1
monitor-exit v0
:try_end_14
.catchall {:try_start_5 .. :try_end_14} :catchall_12
throw v1
.line 764
:cond_15
:try_start_15
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-static {v0}, Lokhttp3/internal/http2/Http2Connection;->access$200(Lokhttp3/internal/http2/Http2Connection;)Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
new-instance v1, Lokhttp3/internal/http2/Http2Connection$PingRunnable;
iget-object v2, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
const/4 v3, 0x1
invoke-direct {v1, v2, v3, p2, p3}, Lokhttp3/internal/http2/Http2Connection$PingRunnable;-><init>(Lokhttp3/internal/http2/Http2Connection;ZII)V
invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledExecutorService;->execute(Ljava/lang/Runnable;)V
:try_end_26
.catch Ljava/util/concurrent/RejectedExecutionException; {:try_start_15 .. :try_end_26} :catch_27
.line 767
goto :goto_28
.line 765
:catch_27
move-exception v0
.line 769
:goto_28
return-void
.end method
.method public priority(IIIZ)V
.registers 5
.param p1, "streamId" # I
.param p2, "streamDependency" # I
.param p3, "weight" # I
.param p4, "exclusive" # Z
.line 810
return-void
.end method
.method public pushPromise(IILjava/util/List;)V
.registers 5
.param p1, "streamId" # I
.param p2, "promisedStreamId" # I
.annotation system Ldalvik/annotation/Signature;
value = {
"(II",
"Ljava/util/List<",
"Lokhttp3/internal/http2/Header;",
">;)V"
}
.end annotation
.line 814
.local p3, "requestHeaders":Ljava/util/List;, "Ljava/util/List<Lokhttp3/internal/http2/Header;>;"
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p2, p3}, Lokhttp3/internal/http2/Http2Connection;->pushRequestLater(ILjava/util/List;)V
.line 815
return-void
.end method
.method public rstStream(ILokhttp3/internal/http2/ErrorCode;)V
.registers 4
.param p1, "streamId" # I
.param p2, "errorCode" # Lokhttp3/internal/http2/ErrorCode;
.line 692
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Http2Connection;->pushedStream(I)Z
move-result v0
if-eqz v0, :cond_e
.line 693
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1, p2}, Lokhttp3/internal/http2/Http2Connection;->pushResetLater(ILokhttp3/internal/http2/ErrorCode;)V
.line 694
return-void
.line 696
:cond_e
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
move-result-object v0
.line 697
.local v0, "rstStream":Lokhttp3/internal/http2/Http2Stream;
if-eqz v0, :cond_19
.line 698
invoke-virtual {v0, p2}, Lokhttp3/internal/http2/Http2Stream;->receiveRstStream(Lokhttp3/internal/http2/ErrorCode;)V
.line 700
:cond_19
return-void
.end method
.method public settings(ZLokhttp3/internal/http2/Settings;)V
.registers 15
.param p1, "clearPrevious" # Z
.param p2, "newSettings" # Lokhttp3/internal/http2/Settings;
.line 703
const-wide/16 v0, 0x0
.line 704
.local v0, "delta":J
const/4 v2, 0x0
.line 705
.local v2, "streamsToNotify":[Lokhttp3/internal/http2/Http2Stream;
iget-object v3, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
monitor-enter v3
.line 706
:try_start_6
iget-object v4, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v4, v4, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {v4}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result v4
.line 707
.local v4, "priorWriteWindowSize":I
if-eqz p1, :cond_17
iget-object v5, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v5, v5, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {v5}, Lokhttp3/internal/http2/Settings;->clear()V
.line 708
:cond_17
iget-object v5, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v5, v5, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {v5, p2}, Lokhttp3/internal/http2/Settings;->merge(Lokhttp3/internal/http2/Settings;)V
.line 709
invoke-direct {p0, p2}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->applyAndAckSettings(Lokhttp3/internal/http2/Settings;)V
.line 710
iget-object v5, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v5, v5, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
invoke-virtual {v5}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
move-result v5
.line 711
.local v5, "peerInitialWindowSize":I
const/4 v6, -0x1
const/4 v7, 0x1
if-eq v5, v6, :cond_5f
if-eq v5, v4, :cond_5f
.line 712
sub-int v6, v5, v4
int-to-long v0, v6
.line 713
iget-object v6, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-boolean v6, v6, Lokhttp3/internal/http2/Http2Connection;->receivedInitialPeerSettings:Z
if-nez v6, :cond_3c
.line 714
iget-object v6, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iput-boolean v7, v6, Lokhttp3/internal/http2/Http2Connection;->receivedInitialPeerSettings:Z
.line 716
:cond_3c
iget-object v6, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v6, v6, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v6}, Ljava/util/Map;->isEmpty()Z
move-result v6
if-nez v6, :cond_5f
.line 717
iget-object v6, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v6, v6, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v6}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v6
iget-object v8, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v8, v8, Lokhttp3/internal/http2/Http2Connection;->streams:Ljava/util/Map;
invoke-interface {v8}, Ljava/util/Map;->size()I
move-result v8
new-array v8, v8, [Lokhttp3/internal/http2/Http2Stream;
invoke-interface {v6, v8}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v6
check-cast v6, [Lokhttp3/internal/http2/Http2Stream;
move-object v2, v6
.line 720
:cond_5f
invoke-static {}, Lokhttp3/internal/http2/Http2Connection;->access$100()Ljava/util/concurrent/ExecutorService;
move-result-object v6
new-instance v8, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;
const-string v9, "OkHttp %s settings"
new-array v7, v7, [Ljava/lang/Object;
iget-object v10, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-object v10, v10, Lokhttp3/internal/http2/Http2Connection;->hostname:Ljava/lang/String;
const/4 v11, 0x0
aput-object v10, v7, v11
invoke-direct {v8, p0, v9, v7}, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable$2;-><init>(Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;Ljava/lang/String;[Ljava/lang/Object;)V
invoke-interface {v6, v8}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V
.line 725
.end local v4 # "priorWriteWindowSize":I
.end local v5 # "peerInitialWindowSize":I
monitor-exit v3
:try_end_77
.catchall {:try_start_6 .. :try_end_77} :catchall_90
.line 726
if-eqz v2, :cond_8f
const-wide/16 v3, 0x0
cmp-long v5, v0, v3
if-eqz v5, :cond_8f
.line 727
array-length v3, v2
:goto_80
if-ge v11, v3, :cond_8f
aget-object v4, v2, v11
.line 728
.local v4, "stream":Lokhttp3/internal/http2/Http2Stream;
monitor-enter v4
.line 729
:try_start_85
invoke-virtual {v4, v0, v1}, Lokhttp3/internal/http2/Http2Stream;->addBytesToWriteWindow(J)V
.line 730
monitor-exit v4
.line 727
.end local v4 # "stream":Lokhttp3/internal/http2/Http2Stream;
add-int/lit8 v11, v11, 0x1
goto :goto_80
.line 730
.restart local v4 # "stream":Lokhttp3/internal/http2/Http2Stream;
:catchall_8c
move-exception v3
monitor-exit v4
:try_end_8e
.catchall {:try_start_85 .. :try_end_8e} :catchall_8c
throw v3
.line 733
.end local v4 # "stream":Lokhttp3/internal/http2/Http2Stream;
:cond_8f
return-void
.line 725
:catchall_90
move-exception v4
:try_start_91
monitor-exit v3
:try_end_92
.catchall {:try_start_91 .. :try_end_92} :catchall_90
goto :goto_94
:goto_93
throw v4
:goto_94
goto :goto_93
.end method
.method public windowUpdate(IJ)V
.registers 8
.param p1, "streamId" # I
.param p2, "windowSizeIncrement" # J
.line 792
if-nez p1, :cond_16
.line 793
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
monitor-enter v0
.line 794
:try_start_5
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
iget-wide v2, v1, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
add-long/2addr v2, p2
iput-wide v2, v1, Lokhttp3/internal/http2/Http2Connection;->bytesLeftInWriteWindow:J
.line 795
iget-object v1, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V
.line 796
monitor-exit v0
goto :goto_27
:catchall_13
move-exception v1
monitor-exit v0
:try_end_15
.catchall {:try_start_5 .. :try_end_15} :catchall_13
throw v1
.line 798
:cond_16
iget-object v0, p0, Lokhttp3/internal/http2/Http2Connection$ReaderRunnable;->this$0:Lokhttp3/internal/http2/Http2Connection;
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Http2Connection;->getStream(I)Lokhttp3/internal/http2/Http2Stream;
move-result-object v0
.line 799
.local v0, "stream":Lokhttp3/internal/http2/Http2Stream;
if-eqz v0, :cond_27
.line 800
monitor-enter v0
.line 801
:try_start_1f
invoke-virtual {v0, p2, p3}, Lokhttp3/internal/http2/Http2Stream;->addBytesToWriteWindow(J)V
.line 802
monitor-exit v0
goto :goto_27
:catchall_24
move-exception v1
monitor-exit v0
:try_end_26
.catchall {:try_start_1f .. :try_end_26} :catchall_24
throw v1
.line 805
.end local v0 # "stream":Lokhttp3/internal/http2/Http2Stream;
:cond_27
:goto_27
return-void
.end method