123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- .class public final Lokhttp3/mockwebserver/MockResponse;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Ljava/lang/Cloneable;
- # static fields
- .field private static final CHUNKED_BODY_HEADER:Ljava/lang/String; = "Transfer-encoding: chunked"
- # instance fields
- .field private body:Lokio/Buffer;
- .field private bodyDelayAmount:J
- .field private bodyDelayUnit:Ljava/util/concurrent/TimeUnit;
- .field private headers:Lokhttp3/Headers$Builder;
- .field private headersDelayAmount:J
- .field private headersDelayUnit:Ljava/util/concurrent/TimeUnit;
- .field private http2ErrorCode:I
- .field private promises:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Lokhttp3/mockwebserver/PushPromise;",
- ">;"
- }
- .end annotation
- .end field
- .field private settings:Lokhttp3/internal/http2/Settings;
- .field private socketPolicy:Lokhttp3/mockwebserver/SocketPolicy;
- .field private status:Ljava/lang/String;
- .field private throttleBytesPerPeriod:J
- .field private throttlePeriodAmount:J
- .field private throttlePeriodUnit:Ljava/util/concurrent/TimeUnit;
- .field private webSocketListener:Lokhttp3/WebSocketListener;
- # direct methods
- .method public constructor <init>()V
- .locals 3
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Lokhttp3/Headers$Builder;
- invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- const-wide v0, 0x7fffffffffffffffL
- iput-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->throttleBytesPerPeriod:J
- const-wide/16 v0, 0x1
- iput-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodAmount:J
- sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodUnit:Ljava/util/concurrent/TimeUnit;
- sget-object v0, Lokhttp3/mockwebserver/SocketPolicy;->KEEP_OPEN:Lokhttp3/mockwebserver/SocketPolicy;
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->socketPolicy:Lokhttp3/mockwebserver/SocketPolicy;
- const/4 v0, -0x1
- iput v0, p0, Lokhttp3/mockwebserver/MockResponse;->http2ErrorCode:I
- const-wide/16 v0, 0x0
- iput-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayAmount:J
- sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
- iput-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayUnit:Ljava/util/concurrent/TimeUnit;
- iput-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayAmount:J
- iput-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayUnit:Ljava/util/concurrent/TimeUnit;
- new-instance v0, Ljava/util/ArrayList;
- invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->promises:Ljava/util/List;
- const/16 v0, 0xc8
- invoke-virtual {p0, v0}, Lokhttp3/mockwebserver/MockResponse;->setResponseCode(I)Lokhttp3/mockwebserver/MockResponse;
- const/4 v0, 0x0
- invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
- move-result-object v0
- const-string v1, "Content-Length"
- invoke-virtual {p0, v1, v0}, Lokhttp3/mockwebserver/MockResponse;->setHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- return-void
- .end method
- # virtual methods
- .method public addHeader(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0, p1}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public addHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
- move-result-object p2
- invoke-virtual {v0, p1, p2}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public addHeaderLenient(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- .locals 2
- sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v1, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
- move-result-object p2
- invoke-virtual {v0, v1, p1, p2}, Lokhttp3/internal/Internal;->addLenient(Lokhttp3/Headers$Builder;Ljava/lang/String;Ljava/lang/String;)V
- return-object p0
- .end method
- .method public clearHeaders()Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- new-instance v0, Lokhttp3/Headers$Builder;
- invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- return-object p0
- .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/mockwebserver/MockResponse;->clone()Lokhttp3/mockwebserver/MockResponse;
- move-result-object v0
- return-object v0
- .end method
- .method public clone()Lokhttp3/mockwebserver/MockResponse;
- .locals 3
- :try_start_0
- invoke-super {p0}, Ljava/lang/Object;->clone()Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Lokhttp3/mockwebserver/MockResponse;
- iget-object v1, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v1}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
- move-result-object v1
- invoke-virtual {v1}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
- move-result-object v1
- iput-object v1, v0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- new-instance v1, Ljava/util/ArrayList;
- iget-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->promises:Ljava/util/List;
- invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
- iput-object v1, v0, Lokhttp3/mockwebserver/MockResponse;->promises:Ljava/util/List;
- :try_end_0
- .catch Ljava/lang/CloneNotSupportedException; {:try_start_0 .. :try_end_0} :catch_0
- return-object v0
- :catch_0
- new-instance v0, Ljava/lang/AssertionError;
- invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
- throw v0
- .end method
- .method public getBody()Lokio/Buffer;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->body:Lokio/Buffer;
- if-eqz v0, :cond_0
- invoke-virtual {v0}, Lokio/Buffer;->clone()Lokio/Buffer;
- move-result-object v0
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return-object v0
- .end method
- .method public getBodyDelay(Ljava/util/concurrent/TimeUnit;)J
- .locals 3
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayAmount:J
- iget-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayUnit:Ljava/util/concurrent/TimeUnit;
- invoke-virtual {p1, v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->convert(JLjava/util/concurrent/TimeUnit;)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public getHeaders()Lokhttp3/Headers;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
- move-result-object v0
- return-object v0
- .end method
- .method public getHeadersDelay(Ljava/util/concurrent/TimeUnit;)J
- .locals 3
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayAmount:J
- iget-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayUnit:Ljava/util/concurrent/TimeUnit;
- invoke-virtual {p1, v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->convert(JLjava/util/concurrent/TimeUnit;)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public getHttp2ErrorCode()I
- .locals 1
- iget v0, p0, Lokhttp3/mockwebserver/MockResponse;->http2ErrorCode:I
- return v0
- .end method
- .method public getPushPromises()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Lokhttp3/mockwebserver/PushPromise;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->promises:Ljava/util/List;
- return-object v0
- .end method
- .method public getSettings()Lokhttp3/internal/http2/Settings;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->settings:Lokhttp3/internal/http2/Settings;
- return-object v0
- .end method
- .method public getSocketPolicy()Lokhttp3/mockwebserver/SocketPolicy;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->socketPolicy:Lokhttp3/mockwebserver/SocketPolicy;
- return-object v0
- .end method
- .method public getStatus()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->status:Ljava/lang/String;
- return-object v0
- .end method
- .method public getThrottleBytesPerPeriod()J
- .locals 2
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->throttleBytesPerPeriod:J
- return-wide v0
- .end method
- .method public getThrottlePeriod(Ljava/util/concurrent/TimeUnit;)J
- .locals 3
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodAmount:J
- iget-object v2, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodUnit:Ljava/util/concurrent/TimeUnit;
- invoke-virtual {p1, v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->convert(JLjava/util/concurrent/TimeUnit;)J
- move-result-wide v0
- return-wide v0
- .end method
- .method public getWebSocketListener()Lokhttp3/WebSocketListener;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->webSocketListener:Lokhttp3/WebSocketListener;
- return-object v0
- .end method
- .method public removeHeader(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0, p1}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public setBody(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- invoke-virtual {v0, p1}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- move-result-object p1
- invoke-virtual {p0, p1}, Lokhttp3/mockwebserver/MockResponse;->setBody(Lokio/Buffer;)Lokhttp3/mockwebserver/MockResponse;
- move-result-object p1
- return-object p1
- .end method
- .method public setBody(Lokio/Buffer;)Lokhttp3/mockwebserver/MockResponse;
- .locals 2
- invoke-virtual {p1}, Lokio/Buffer;->size()J
- move-result-wide v0
- invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
- move-result-object v0
- const-string v1, "Content-Length"
- invoke-virtual {p0, v1, v0}, Lokhttp3/mockwebserver/MockResponse;->setHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- invoke-virtual {p1}, Lokio/Buffer;->clone()Lokio/Buffer;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->body:Lokio/Buffer;
- return-object p0
- .end method
- .method public setBodyDelay(JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-wide p1, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayAmount:J
- iput-object p3, p0, Lokhttp3/mockwebserver/MockResponse;->bodyDelayUnit:Ljava/util/concurrent/TimeUnit;
- return-object p0
- .end method
- .method public setChunkedBody(Ljava/lang/String;I)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- invoke-virtual {v0, p1}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- move-result-object p1
- invoke-virtual {p0, p1, p2}, Lokhttp3/mockwebserver/MockResponse;->setChunkedBody(Lokio/Buffer;I)Lokhttp3/mockwebserver/MockResponse;
- move-result-object p1
- return-object p1
- .end method
- .method public setChunkedBody(Lokio/Buffer;I)Lokhttp3/mockwebserver/MockResponse;
- .locals 5
- const-string v0, "Content-Length"
- invoke-virtual {p0, v0}, Lokhttp3/mockwebserver/MockResponse;->removeHeader(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- const-string v1, "Transfer-encoding: chunked"
- invoke-virtual {v0, v1}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- :goto_0
- invoke-virtual {p1}, Lokio/Buffer;->exhausted()Z
- move-result v1
- if-nez v1, :cond_0
- invoke-virtual {p1}, Lokio/Buffer;->size()J
- move-result-wide v1
- int-to-long v3, p2
- invoke-static {v1, v2, v3, v4}, Ljava/lang/Math;->min(JJ)J
- move-result-wide v1
- invoke-virtual {v0, v1, v2}, Lokio/Buffer;->writeHexadecimalUnsignedLong(J)Lokio/Buffer;
- const-string v3, "\r\n"
- invoke-virtual {v0, v3}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- invoke-virtual {v0, p1, v1, v2}, Lokio/Buffer;->write(Lokio/Buffer;J)V
- invoke-virtual {v0, v3}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- goto :goto_0
- :cond_0
- const-string p1, "0\r\n\r\n"
- invoke-virtual {v0, p1}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;)Lokio/Buffer;
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->body:Lokio/Buffer;
- return-object p0
- .end method
- .method public setHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- invoke-virtual {p0, p1}, Lokhttp3/mockwebserver/MockResponse;->removeHeader(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- invoke-virtual {p0, p1, p2}, Lokhttp3/mockwebserver/MockResponse;->addHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- move-result-object p1
- return-object p1
- .end method
- .method public setHeaders(Lokhttp3/Headers;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- invoke-virtual {p1}, Lokhttp3/Headers;->newBuilder()Lokhttp3/Headers$Builder;
- move-result-object p1
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->headers:Lokhttp3/Headers$Builder;
- return-object p0
- .end method
- .method public setHeadersDelay(JLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-wide p1, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayAmount:J
- iput-object p3, p0, Lokhttp3/mockwebserver/MockResponse;->headersDelayUnit:Ljava/util/concurrent/TimeUnit;
- return-object p0
- .end method
- .method public setHttp2ErrorCode(I)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput p1, p0, Lokhttp3/mockwebserver/MockResponse;->http2ErrorCode:I
- return-object p0
- .end method
- .method public setResponseCode(I)Lokhttp3/mockwebserver/MockResponse;
- .locals 3
- const/16 v0, 0xc8
- const/16 v1, 0x64
- if-lt p1, v1, :cond_0
- if-ge p1, v0, :cond_0
- const-string v0, "Informational"
- goto :goto_0
- :cond_0
- const/16 v1, 0x12c
- if-lt p1, v0, :cond_1
- if-ge p1, v1, :cond_1
- const-string v0, "OK"
- goto :goto_0
- :cond_1
- const/16 v0, 0x190
- if-lt p1, v1, :cond_2
- if-ge p1, v0, :cond_2
- const-string v0, "Redirection"
- goto :goto_0
- :cond_2
- const/16 v1, 0x1f4
- if-lt p1, v0, :cond_3
- if-ge p1, v1, :cond_3
- const-string v0, "Client Error"
- goto :goto_0
- :cond_3
- if-lt p1, v1, :cond_4
- const/16 v0, 0x258
- if-ge p1, v0, :cond_4
- const-string v0, "Server Error"
- goto :goto_0
- :cond_4
- const-string v0, "Mock Response"
- :goto_0
- new-instance v1, Ljava/lang/StringBuilder;
- invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
- const-string v2, "HTTP/1.1 "
- invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- const-string p1, " "
- invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p1
- invoke-virtual {p0, p1}, Lokhttp3/mockwebserver/MockResponse;->setStatus(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- move-result-object p1
- return-object p1
- .end method
- .method public setSocketPolicy(Lokhttp3/mockwebserver/SocketPolicy;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->socketPolicy:Lokhttp3/mockwebserver/SocketPolicy;
- return-object p0
- .end method
- .method public setStatus(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->status:Ljava/lang/String;
- return-object p0
- .end method
- .method public throttleBody(JJLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-wide p1, p0, Lokhttp3/mockwebserver/MockResponse;->throttleBytesPerPeriod:J
- iput-wide p3, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodAmount:J
- iput-object p5, p0, Lokhttp3/mockwebserver/MockResponse;->throttlePeriodUnit:Ljava/util/concurrent/TimeUnit;
- return-object p0
- .end method
- .method public toString()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->status:Ljava/lang/String;
- return-object v0
- .end method
- .method public withPush(Lokhttp3/mockwebserver/PushPromise;)Lokhttp3/mockwebserver/MockResponse;
- .locals 1
- iget-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->promises:Ljava/util/List;
- invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- return-object p0
- .end method
- .method public withSettings(Lokhttp3/internal/http2/Settings;)Lokhttp3/mockwebserver/MockResponse;
- .locals 0
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->settings:Lokhttp3/internal/http2/Settings;
- return-object p0
- .end method
- .method public withWebSocketUpgrade(Lokhttp3/WebSocketListener;)Lokhttp3/mockwebserver/MockResponse;
- .locals 2
- const-string v0, "HTTP/1.1 101 Switching Protocols"
- invoke-virtual {p0, v0}, Lokhttp3/mockwebserver/MockResponse;->setStatus(Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
- const-string v0, "Upgrade"
- const-string v1, "Connection"
- invoke-virtual {p0, v1, v0}, Lokhttp3/mockwebserver/MockResponse;->setHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- const-string v1, "websocket"
- invoke-virtual {p0, v0, v1}, Lokhttp3/mockwebserver/MockResponse;->setHeader(Ljava/lang/String;Ljava/lang/Object;)Lokhttp3/mockwebserver/MockResponse;
- const/4 v0, 0x0
- iput-object v0, p0, Lokhttp3/mockwebserver/MockResponse;->body:Lokio/Buffer;
- iput-object p1, p0, Lokhttp3/mockwebserver/MockResponse;->webSocketListener:Lokhttp3/WebSocketListener;
- return-object p0
- .end method
|