RealInterceptorChain.smali
.class public final Lokhttp3/internal/http/RealInterceptorChain;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lokhttp3/u$a;
# instance fields
.field private final call:Lokhttp3/e;
.field private calls:I
.field private final connectTimeout:I
.field private final connection:Lokhttp3/internal/connection/c;
.field private final eventListener:Lokhttp3/p;
.field private final httpCodec:Lokhttp3/internal/http/c;
.field private final index:I
.field public final interceptors:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lokhttp3/u;",
">;"
}
.end annotation
.end field
.field private final readTimeout:I
.field private final request:Lokhttp3/aa;
.field private final streamAllocation:Lokhttp3/internal/connection/f;
.field private final writeTimeout:I
# direct methods
.method public constructor <init>(Ljava/util/List;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;ILokhttp3/aa;Lokhttp3/e;Lokhttp3/p;III)V
.registers 12
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"Lokhttp3/u;",
">;",
"Lokhttp3/internal/connection/f;",
"Lokhttp3/internal/http/c;",
"Lokhttp3/internal/connection/c;",
"I",
"Lokhttp3/aa;",
"Lokhttp3/e;",
"Lokhttp3/p;",
"III)V"
}
.end annotation
.line 52
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 53
iput-object p1, p0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
.line 54
iput-object p4, p0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
.line 55
iput-object p2, p0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
.line 56
iput-object p3, p0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
.line 57
iput p5, p0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
.line 58
iput-object p6, p0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/aa;
.line 59
iput-object p7, p0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
.line 60
iput-object p8, p0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
.line 61
iput p9, p0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
.line 62
iput p10, p0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
.line 63
iput p11, p0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
return-void
.end method
# virtual methods
.method public final call()Lokhttp3/e;
.registers 2
.line 109
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
return-object v0
.end method
.method public final connectTimeoutMillis()I
.registers 2
.line 71
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
return v0
.end method
.method public final connection()Lokhttp3/i;
.registers 2
.line 67
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
return-object v0
.end method
.method public final eventListener()Lokhttp3/p;
.registers 2
.line 113
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
return-object v0
.end method
.method public final httpStream()Lokhttp3/internal/http/c;
.registers 2
.line 105
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
return-object v0
.end method
.method public final proceed(Lokhttp3/aa;)Lokhttp3/ad;
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 121
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
iget-object v1, p0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
iget-object v2, p0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
invoke-virtual {p0, p1, v0, v1, v2}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/aa;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;)Lokhttp3/ad;
move-result-object p1
return-object p1
.end method
.method public final proceed(Lokhttp3/aa;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;)Lokhttp3/ad;
.registers 23
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p0
.line 126
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iget-object v2, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v2
if-ge v1, v2, :cond_102
.line 128
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
const/4 v2, 0x1
add-int/2addr v1, v2
iput v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
.line 131
iget-object v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
const-string v3, "network interceptor "
if-eqz v1, :cond_45
iget-object v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
move-object/from16 v10, p1
.line 1049
iget-object v4, v10, Lokhttp3/aa;->a:Lokhttp3/t;
.line 131
invoke-virtual {v1, v4}, Lokhttp3/internal/connection/c;->a(Lokhttp3/t;)Z
move-result v1
if-eqz v1, :cond_25
goto :goto_47
.line 132
:cond_25
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v3, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
sub-int/2addr v5, v2
invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, " must retain the same host and port"
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
:cond_45
move-object/from16 v10, p1
.line 137
:goto_47
iget-object v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
const-string v15, " must call proceed() exactly once"
if-eqz v1, :cond_70
iget v1, v0, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
if-gt v1, v2, :cond_52
goto :goto_70
.line 138
:cond_52
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v3, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
sub-int/2addr v5, v2
invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v4, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
.line 143
:cond_70
:goto_70
new-instance v1, Lokhttp3/internal/http/RealInterceptorChain;
iget-object v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v4, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
add-int/lit8 v9, v4, 0x1
iget-object v11, v0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
iget-object v12, v0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
iget v13, v0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
iget v14, v0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
iget v8, v0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
move-object v4, v1
move-object/from16 v6, p2
move-object/from16 v7, p3
move/from16 v16, v8
move-object/from16 v8, p4
move-object/from16 v10, p1
move-object/from16 v17, v15
move/from16 v15, v16
invoke-direct/range {v4 .. v15}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;ILokhttp3/aa;Lokhttp3/e;Lokhttp3/p;III)V
.line 146
iget-object v4, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
invoke-interface {v4, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Lokhttp3/u;
.line 147
invoke-interface {v4, v1}, Lokhttp3/u;->intercept(Lokhttp3/u$a;)Lokhttp3/ad;
move-result-object v5
if-eqz p3, :cond_cb
.line 150
iget v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
add-int/2addr v6, v2
iget-object v7, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
invoke-interface {v7}, Ljava/util/List;->size()I
move-result v7
if-ge v6, v7, :cond_cb
iget v1, v1, Lokhttp3/internal/http/RealInterceptorChain;->calls:I
if-ne v1, v2, :cond_b4
goto :goto_cb
.line 151
:cond_b4
new-instance v1, Ljava/lang/IllegalStateException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-object/from16 v3, v17
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v1
:cond_cb
:goto_cb
const-string v1, "interceptor "
if-eqz v5, :cond_eb
.line 1177
iget-object v2, v5, Lokhttp3/ad;->g:Lokhttp3/ae;
if-eqz v2, :cond_d4
return-object v5
.line 161
:cond_d4
new-instance v2, Ljava/lang/IllegalStateException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " returned a response with no body"
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v2, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v2
.line 157
:cond_eb
new-instance v2, Ljava/lang/NullPointerException;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, " returned null"
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v2, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v2
.line 126
:cond_102
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1}, Ljava/lang/AssertionError;-><init>()V
throw v1
.end method
.method public final readTimeoutMillis()I
.registers 2
.line 81
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
return v0
.end method
.method public final request()Lokhttp3/aa;
.registers 2
.line 117
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/aa;
return-object v0
.end method
.method public final streamAllocation()Lokhttp3/internal/connection/f;
.registers 2
.line 101
iget-object v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
return-object v0
.end method
.method public final withConnectTimeout(ILjava/util/concurrent/TimeUnit;)Lokhttp3/u$a;
.registers 19
move-object/from16 v0, p0
move/from16 v1, p1
int-to-long v1, v1
const-string v3, "timeout"
move-object/from16 v4, p2
.line 75
invoke-static {v3, v1, v2, v4}, Lokhttp3/internal/c;->a(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
move-result v13
.line 76
new-instance v1, Lokhttp3/internal/http/RealInterceptorChain;
iget-object v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget-object v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
iget-object v7, v0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
iget-object v8, v0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
iget v9, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iget-object v10, v0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/aa;
iget-object v11, v0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
iget-object v12, v0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
iget v14, v0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
iget v15, v0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
move-object v4, v1
invoke-direct/range {v4 .. v15}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;ILokhttp3/aa;Lokhttp3/e;Lokhttp3/p;III)V
return-object v1
.end method
.method public final withReadTimeout(ILjava/util/concurrent/TimeUnit;)Lokhttp3/u$a;
.registers 19
move-object/from16 v0, p0
move/from16 v1, p1
int-to-long v1, v1
const-string v3, "timeout"
move-object/from16 v4, p2
.line 85
invoke-static {v3, v1, v2, v4}, Lokhttp3/internal/c;->a(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
move-result v14
.line 86
new-instance v1, Lokhttp3/internal/http/RealInterceptorChain;
iget-object v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget-object v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
iget-object v7, v0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
iget-object v8, v0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
iget v9, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iget-object v10, v0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/aa;
iget-object v11, v0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
iget-object v12, v0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
iget v13, v0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
iget v15, v0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
move-object v4, v1
invoke-direct/range {v4 .. v15}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;ILokhttp3/aa;Lokhttp3/e;Lokhttp3/p;III)V
return-object v1
.end method
.method public final withWriteTimeout(ILjava/util/concurrent/TimeUnit;)Lokhttp3/u$a;
.registers 19
move-object/from16 v0, p0
move/from16 v1, p1
int-to-long v1, v1
const-string v3, "timeout"
move-object/from16 v4, p2
.line 95
invoke-static {v3, v1, v2, v4}, Lokhttp3/internal/c;->a(Ljava/lang/String;JLjava/util/concurrent/TimeUnit;)I
move-result v15
.line 96
new-instance v1, Lokhttp3/internal/http/RealInterceptorChain;
iget-object v5, v0, Lokhttp3/internal/http/RealInterceptorChain;->interceptors:Ljava/util/List;
iget-object v6, v0, Lokhttp3/internal/http/RealInterceptorChain;->streamAllocation:Lokhttp3/internal/connection/f;
iget-object v7, v0, Lokhttp3/internal/http/RealInterceptorChain;->httpCodec:Lokhttp3/internal/http/c;
iget-object v8, v0, Lokhttp3/internal/http/RealInterceptorChain;->connection:Lokhttp3/internal/connection/c;
iget v9, v0, Lokhttp3/internal/http/RealInterceptorChain;->index:I
iget-object v10, v0, Lokhttp3/internal/http/RealInterceptorChain;->request:Lokhttp3/aa;
iget-object v11, v0, Lokhttp3/internal/http/RealInterceptorChain;->call:Lokhttp3/e;
iget-object v12, v0, Lokhttp3/internal/http/RealInterceptorChain;->eventListener:Lokhttp3/p;
iget v13, v0, Lokhttp3/internal/http/RealInterceptorChain;->connectTimeout:I
iget v14, v0, Lokhttp3/internal/http/RealInterceptorChain;->readTimeout:I
move-object v4, v1
invoke-direct/range {v4 .. v15}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/f;Lokhttp3/internal/http/c;Lokhttp3/internal/connection/c;ILokhttp3/aa;Lokhttp3/e;Lokhttp3/p;III)V
return-object v1
.end method
.method public final writeTimeoutMillis()I
.registers 2
.line 91
iget v0, p0, Lokhttp3/internal/http/RealInterceptorChain;->writeTimeout:I
return v0
.end method