123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- .class final Lokhttp3/RealCall;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Lokhttp3/Call;
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokhttp3/RealCall$AsyncCall;
- }
- .end annotation
- # instance fields
- .field final client:Lokhttp3/OkHttpClient;
- .field private eventListener:Lokhttp3/EventListener;
- .field private executed:Z
- .field final forWebSocket:Z
- .field final originalRequest:Lokhttp3/Request;
- .field final retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- # direct methods
- .method private constructor <init>(Lokhttp3/OkHttpClient;Lokhttp3/Request;Z)V
- .locals 0
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- iput-object p2, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- iput-boolean p3, p0, Lokhttp3/RealCall;->forWebSocket:Z
- new-instance p2, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-direct {p2, p1, p3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;-><init>(Lokhttp3/OkHttpClient;Z)V
- iput-object p2, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- return-void
- .end method
- .method static synthetic access$000(Lokhttp3/RealCall;)Lokhttp3/EventListener;
- .locals 0
- iget-object p0, p0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- return-object p0
- .end method
- .method private captureCallStackTrace()V
- .locals 2
- invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
- move-result-object v0
- const-string v1, "response.body().close()"
- invoke-virtual {v0, v1}, Lokhttp3/internal/platform/Platform;->getStackTraceForCloseable(Ljava/lang/String;)Ljava/lang/Object;
- move-result-object v0
- iget-object v1, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-virtual {v1, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->setCallStackTrace(Ljava/lang/Object;)V
- return-void
- .end method
- .method static newRealCall(Lokhttp3/OkHttpClient;Lokhttp3/Request;Z)Lokhttp3/RealCall;
- .locals 1
- new-instance v0, Lokhttp3/RealCall;
- invoke-direct {v0, p0, p1, p2}, Lokhttp3/RealCall;-><init>(Lokhttp3/OkHttpClient;Lokhttp3/Request;Z)V
- invoke-virtual {p0}, Lokhttp3/OkHttpClient;->eventListenerFactory()Lokhttp3/EventListener$Factory;
- move-result-object p0
- invoke-interface {p0, v0}, Lokhttp3/EventListener$Factory;->create(Lokhttp3/Call;)Lokhttp3/EventListener;
- move-result-object p0
- iput-object p0, v0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- return-object v0
- .end method
- # virtual methods
- .method public cancel()V
- .locals 1
- iget-object v0, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-virtual {v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->cancel()V
- return-void
- .end method
- .method public bridge synthetic clone()Ljava/lang/Object;
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/lang/CloneNotSupportedException;
- }
- .end annotation
- invoke-virtual {p0}, Lokhttp3/RealCall;->clone()Lokhttp3/RealCall;
- move-result-object v0
- return-object v0
- .end method
- .method public bridge synthetic clone()Lokhttp3/Call;
- .locals 1
- invoke-virtual {p0}, Lokhttp3/RealCall;->clone()Lokhttp3/RealCall;
- move-result-object v0
- return-object v0
- .end method
- .method public clone()Lokhttp3/RealCall;
- .locals 3
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- iget-object v1, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- iget-boolean v2, p0, Lokhttp3/RealCall;->forWebSocket:Z
- invoke-static {v0, v1, v2}, Lokhttp3/RealCall;->newRealCall(Lokhttp3/OkHttpClient;Lokhttp3/Request;Z)Lokhttp3/RealCall;
- move-result-object v0
- return-object v0
- .end method
- .method public enqueue(Lokhttp3/Callback;)V
- .locals 2
- monitor-enter p0
- :try_start_0
- iget-boolean v0, p0, Lokhttp3/RealCall;->executed:Z
- if-nez v0, :cond_0
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/RealCall;->executed:Z
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-direct {p0}, Lokhttp3/RealCall;->captureCallStackTrace()V
- iget-object v0, p0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- invoke-virtual {v0, p0}, Lokhttp3/EventListener;->callStart(Lokhttp3/Call;)V
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->dispatcher()Lokhttp3/Dispatcher;
- move-result-object v0
- new-instance v1, Lokhttp3/RealCall$AsyncCall;
- invoke-direct {v1, p0, p1}, Lokhttp3/RealCall$AsyncCall;-><init>(Lokhttp3/RealCall;Lokhttp3/Callback;)V
- invoke-virtual {v0, v1}, Lokhttp3/Dispatcher;->enqueue(Lokhttp3/RealCall$AsyncCall;)V
- return-void
- :cond_0
- :try_start_1
- new-instance p1, Ljava/lang/IllegalStateException;
- const-string v0, "Already Executed"
- invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- :catchall_0
- move-exception p1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method public execute()Lokhttp3/Response;
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- monitor-enter p0
- :try_start_0
- iget-boolean v0, p0, Lokhttp3/RealCall;->executed:Z
- if-nez v0, :cond_1
- const/4 v0, 0x1
- iput-boolean v0, p0, Lokhttp3/RealCall;->executed:Z
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_1
- invoke-direct {p0}, Lokhttp3/RealCall;->captureCallStackTrace()V
- iget-object v0, p0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- invoke-virtual {v0, p0}, Lokhttp3/EventListener;->callStart(Lokhttp3/Call;)V
- :try_start_1
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->dispatcher()Lokhttp3/Dispatcher;
- move-result-object v0
- invoke-virtual {v0, p0}, Lokhttp3/Dispatcher;->executed(Lokhttp3/RealCall;)V
- invoke-virtual {p0}, Lokhttp3/RealCall;->getResponseWithInterceptorChain()Lokhttp3/Response;
- move-result-object v0
- :try_end_1
- .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- if-eqz v0, :cond_0
- iget-object v1, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v1}, Lokhttp3/OkHttpClient;->dispatcher()Lokhttp3/Dispatcher;
- move-result-object v1
- invoke-virtual {v1, p0}, Lokhttp3/Dispatcher;->finished(Lokhttp3/RealCall;)V
- return-object v0
- :cond_0
- :try_start_2
- new-instance v0, Ljava/io/IOException;
- const-string v1, "Canceled"
- invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- throw v0
- :try_end_2
- .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
- .catchall {:try_start_2 .. :try_end_2} :catchall_0
- :catchall_0
- move-exception v0
- goto :goto_0
- :catch_0
- move-exception v0
- :try_start_3
- iget-object v1, p0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- invoke-virtual {v1, p0, v0}, Lokhttp3/EventListener;->callFailed(Lokhttp3/Call;Ljava/io/IOException;)V
- throw v0
- :try_end_3
- .catchall {:try_start_3 .. :try_end_3} :catchall_0
- :goto_0
- iget-object v1, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v1}, Lokhttp3/OkHttpClient;->dispatcher()Lokhttp3/Dispatcher;
- move-result-object v1
- invoke-virtual {v1, p0}, Lokhttp3/Dispatcher;->finished(Lokhttp3/RealCall;)V
- throw v0
- :cond_1
- :try_start_4
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "Already Executed"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :catchall_1
- move-exception v0
- monitor-exit p0
- :try_end_4
- .catchall {:try_start_4 .. :try_end_4} :catchall_1
- throw v0
- .end method
- .method getResponseWithInterceptorChain()Lokhttp3/Response;
- .locals 13
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- new-instance v1, Ljava/util/ArrayList;
- invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->interceptors()Ljava/util/List;
- move-result-object v0
- invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- iget-object v0, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance v0, Lokhttp3/internal/http/BridgeInterceptor;
- iget-object v2, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v2}, Lokhttp3/OkHttpClient;->cookieJar()Lokhttp3/CookieJar;
- move-result-object v2
- invoke-direct {v0, v2}, Lokhttp3/internal/http/BridgeInterceptor;-><init>(Lokhttp3/CookieJar;)V
- invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance v0, Lokhttp3/internal/cache/CacheInterceptor;
- iget-object v2, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v2}, Lokhttp3/OkHttpClient;->internalCache()Lokhttp3/internal/cache/InternalCache;
- move-result-object v2
- invoke-direct {v0, v2}, Lokhttp3/internal/cache/CacheInterceptor;-><init>(Lokhttp3/internal/cache/InternalCache;)V
- invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance v0, Lokhttp3/internal/connection/ConnectInterceptor;
- iget-object v2, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-direct {v0, v2}, Lokhttp3/internal/connection/ConnectInterceptor;-><init>(Lokhttp3/OkHttpClient;)V
- invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- iget-boolean v0, p0, Lokhttp3/RealCall;->forWebSocket:Z
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->networkInterceptors()Ljava/util/List;
- move-result-object v0
- invoke-interface {v1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- :cond_0
- new-instance v0, Lokhttp3/internal/http/CallServerInterceptor;
- iget-boolean v2, p0, Lokhttp3/RealCall;->forWebSocket:Z
- invoke-direct {v0, v2}, Lokhttp3/internal/http/CallServerInterceptor;-><init>(Z)V
- invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- new-instance v12, Lokhttp3/internal/http/RealInterceptorChain;
- const/4 v2, 0x0
- const/4 v3, 0x0
- const/4 v4, 0x0
- const/4 v5, 0x0
- iget-object v6, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- iget-object v8, p0, Lokhttp3/RealCall;->eventListener:Lokhttp3/EventListener;
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->connectTimeoutMillis()I
- move-result v9
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->readTimeoutMillis()I
- move-result v10
- iget-object v0, p0, Lokhttp3/RealCall;->client:Lokhttp3/OkHttpClient;
- invoke-virtual {v0}, Lokhttp3/OkHttpClient;->writeTimeoutMillis()I
- move-result v11
- move-object v0, v12
- move-object v7, p0
- invoke-direct/range {v0 .. v11}, Lokhttp3/internal/http/RealInterceptorChain;-><init>(Ljava/util/List;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/internal/http/HttpCodec;Lokhttp3/internal/connection/RealConnection;ILokhttp3/Request;Lokhttp3/Call;Lokhttp3/EventListener;III)V
- iget-object v0, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- invoke-interface {v12, v0}, Lokhttp3/Interceptor$Chain;->proceed(Lokhttp3/Request;)Lokhttp3/Response;
- move-result-object v0
- return-object v0
- .end method
- .method public isCanceled()Z
- .locals 1
- iget-object v0, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-virtual {v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->isCanceled()Z
- move-result v0
- return v0
- .end method
- .method public declared-synchronized isExecuted()Z
- .locals 1
- monitor-enter p0
- :try_start_0
- iget-boolean v0, p0, Lokhttp3/RealCall;->executed:Z
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- monitor-exit p0
- return v0
- :catchall_0
- move-exception v0
- monitor-exit p0
- throw v0
- .end method
- .method redactedUrl()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl;->redact()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
- .method public request()Lokhttp3/Request;
- .locals 1
- iget-object v0, p0, Lokhttp3/RealCall;->originalRequest:Lokhttp3/Request;
- return-object v0
- .end method
- .method streamAllocation()Lokhttp3/internal/connection/StreamAllocation;
- .locals 1
- iget-object v0, p0, Lokhttp3/RealCall;->retryAndFollowUpInterceptor:Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
- invoke-virtual {v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation()Lokhttp3/internal/connection/StreamAllocation;
- move-result-object v0
- return-object v0
- .end method
- .method toLoggableString()Ljava/lang/String;
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-virtual {p0}, Lokhttp3/RealCall;->isCanceled()Z
- move-result v1
- if-eqz v1, :cond_0
- const-string v1, "canceled "
- goto :goto_0
- :cond_0
- const-string v1, ""
- :goto_0
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-boolean v1, p0, Lokhttp3/RealCall;->forWebSocket:Z
- if-eqz v1, :cond_1
- const-string v1, "web socket"
- goto :goto_1
- :cond_1
- const-string v1, "call"
- :goto_1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v1, " to "
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {p0}, Lokhttp3/RealCall;->redactedUrl()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
|