1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048 |
- .class public final Lokhttp3/internal/http2/Http2Stream;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokhttp3/internal/http2/Http2Stream$StreamTimeout;,
- Lokhttp3/internal/http2/Http2Stream$FramingSink;,
- Lokhttp3/internal/http2/Http2Stream$FramingSource;
- }
- .end annotation
- # static fields
- .field static final synthetic $assertionsDisabled:Z
- # instance fields
- .field bytesLeftInWriteWindow:J
- .field final connection:Lokhttp3/internal/http2/Http2Connection;
- .field errorCode:Lokhttp3/internal/http2/ErrorCode;
- .field private hasResponseHeaders:Z
- .field final id:I
- .field final readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- .field private final requestHeaders:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;"
- }
- .end annotation
- .end field
- .field private responseHeaders:Ljava/util/List;
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;"
- }
- .end annotation
- .end field
- .field final sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- .field private final source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- .field unacknowledgedBytesRead:J
- .field final writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- # direct methods
- .method static constructor <clinit>()V
- .locals 0
- return-void
- .end method
- .method constructor <init>(ILokhttp3/internal/http2/Http2Connection;ZZLjava/util/List;)V
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(I",
- "Lokhttp3/internal/http2/Http2Connection;",
- "ZZ",
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;)V"
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- const-wide/16 v0, 0x0
- iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->unacknowledgedBytesRead:J
- new-instance v0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- invoke-direct {v0, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
- iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- new-instance v0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- invoke-direct {v0, p0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
- iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- const/4 v0, 0x0
- iput-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- if-eqz p2, :cond_1
- if-eqz p5, :cond_0
- iput p1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- iput-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget-object p1, p2, Lokhttp3/internal/http2/Http2Connection;->peerSettings:Lokhttp3/internal/http2/Settings;
- invoke-virtual {p1}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
- move-result p1
- int-to-long v0, p1
- iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
- new-instance p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-object p2, p2, Lokhttp3/internal/http2/Http2Connection;->okHttpSettings:Lokhttp3/internal/http2/Settings;
- invoke-virtual {p2}, Lokhttp3/internal/http2/Settings;->getInitialWindowSize()I
- move-result p2
- int-to-long v0, p2
- invoke-direct {p1, p0, v0, v1}, Lokhttp3/internal/http2/Http2Stream$FramingSource;-><init>(Lokhttp3/internal/http2/Http2Stream;J)V
- iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- new-instance p1, Lokhttp3/internal/http2/Http2Stream$FramingSink;
- invoke-direct {p1, p0}, Lokhttp3/internal/http2/Http2Stream$FramingSink;-><init>(Lokhttp3/internal/http2/Http2Stream;)V
- iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iput-boolean p4, p1, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
- iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iput-boolean p3, p1, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- iput-object p5, p0, Lokhttp3/internal/http2/Http2Stream;->requestHeaders:Ljava/util/List;
- return-void
- :cond_0
- new-instance p1, Ljava/lang/NullPointerException;
- const-string p2, "requestHeaders == null"
- invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- :cond_1
- new-instance p1, Ljava/lang/NullPointerException;
- const-string p2, "connection == null"
- invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method private closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z
- .locals 2
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- const/4 v1, 0x0
- if-eqz v0, :cond_0
- monitor-exit p0
- return v1
- :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
- if-eqz v0, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- if-eqz v0, :cond_1
- monitor-exit p0
- return v1
- :cond_1
- iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
- const/4 p1, 0x1
- return p1
- :catchall_0
- move-exception p1
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- # virtual methods
- .method addBytesToWriteWindow(J)V
- .locals 3
- iget-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
- add-long/2addr v0, p1
- iput-wide v0, p0, Lokhttp3/internal/http2/Http2Stream;->bytesLeftInWriteWindow:J
- const-wide/16 v0, 0x0
- cmp-long v2, p1, v0
- if-lez v2, :cond_0
- invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
- :cond_0
- return-void
- .end method
- .method cancelStreamIfNecessary()V
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
- if-nez v0, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
- if-eqz v0, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
- if-eqz v0, :cond_1
- :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_1
- const/4 v0, 0x0
- :goto_0
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
- move-result v1
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- if-eqz v0, :cond_2
- sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
- invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;)V
- goto :goto_1
- :cond_2
- if-nez v1, :cond_3
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
- :cond_3
- :goto_1
- return-void
- :catchall_0
- move-exception v0
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v0
- .end method
- .method checkOutNotClosed()V
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
- if-nez v1, :cond_2
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- if-nez v0, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- if-nez v0, :cond_0
- return-void
- :cond_0
- new-instance v1, Lokhttp3/internal/http2/StreamResetException;
- invoke-direct {v1, v0}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
- throw v1
- :cond_1
- 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
- :cond_2
- 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
- .end method
- .method public close(Lokhttp3/internal/http2/ErrorCode;)V
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-direct {p0, p1}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z
- move-result v0
- if-nez v0, :cond_0
- return-void
- :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynReset(ILokhttp3/internal/http2/ErrorCode;)V
- return-void
- .end method
- .method public closeLater(Lokhttp3/internal/http2/ErrorCode;)V
- .locals 2
- invoke-direct {p0, p1}, Lokhttp3/internal/http2/Http2Stream;->closeInternal(Lokhttp3/internal/http2/ErrorCode;)Z
- move-result v0
- if-nez v0, :cond_0
- return-void
- :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynResetLater(ILokhttp3/internal/http2/ErrorCode;)V
- return-void
- .end method
- .method public getConnection()Lokhttp3/internal/http2/Http2Connection;
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- return-object v0
- .end method
- .method public declared-synchronized getErrorCode()Lokhttp3/internal/http2/ErrorCode;
- .locals 1
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- monitor-exit p0
- return-object v0
- :catchall_0
- move-exception v0
- monitor-exit p0
- throw v0
- .end method
- .method public getId()I
- .locals 1
- iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- return v0
- .end method
- .method public getRequestHeaders()Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->requestHeaders:Ljava/util/List;
- return-object v0
- .end method
- .method public getSink()Lokio/Sink;
- .locals 2
- monitor-enter p0
- :try_start_0
- iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
- if-nez v0, :cond_1
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
- move-result v0
- if-eqz v0, :cond_0
- goto :goto_0
- :cond_0
- 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
- :cond_1
- :goto_0
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- return-object v0
- :catchall_0
- move-exception v0
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v0
- .end method
- .method public getSource()Lokio/Source;
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- return-object v0
- .end method
- .method public isLocallyInitiated()Z
- .locals 4
- iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- const/4 v1, 0x1
- and-int/2addr v0, v1
- const/4 v2, 0x0
- if-ne v0, v1, :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- iget-object v3, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget-boolean v3, v3, Lokhttp3/internal/http2/Http2Connection;->client:Z
- if-ne v3, v0, :cond_1
- goto :goto_1
- :cond_1
- const/4 v1, 0x0
- :goto_1
- return v1
- .end method
- .method public declared-synchronized isOpen()Z
- .locals 2
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- const/4 v1, 0x0
- if-eqz v0, :cond_0
- monitor-exit p0
- return v1
- :cond_0
- :try_start_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
- if-nez v0, :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->closed:Z
- if-eqz v0, :cond_3
- :cond_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- if-nez v0, :cond_2
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iget-boolean v0, v0, Lokhttp3/internal/http2/Http2Stream$FramingSink;->closed:Z
- if-eqz v0, :cond_3
- :cond_2
- iget-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- if-eqz v0, :cond_3
- monitor-exit p0
- return v1
- :cond_3
- const/4 v0, 0x1
- monitor-exit p0
- return v0
- :catchall_0
- move-exception v0
- monitor-exit p0
- throw v0
- .end method
- .method public readTimeout()Lokio/Timeout;
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- return-object v0
- .end method
- .method receiveData(Lokio/BufferedSource;I)V
- .locals 3
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- int-to-long v1, p2
- invoke-virtual {v0, p1, v1, v2}, Lokhttp3/internal/http2/Http2Stream$FramingSource;->receive(Lokio/BufferedSource;J)V
- return-void
- .end method
- .method receiveFin()V
- .locals 2
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->source:Lokhttp3/internal/http2/Http2Stream$FramingSource;
- const/4 v1, 0x1
- iput-boolean v1, v0, Lokhttp3/internal/http2/Http2Stream$FramingSource;->finished:Z
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
- move-result v0
- invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
- :cond_0
- return-void
- :catchall_0
- move-exception v0
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v0
- .end method
- .method receiveHeaders(Ljava/util/List;)V
- .locals 3
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;)V"
- }
- .end annotation
- monitor-enter p0
- const/4 v0, 0x1
- :try_start_0
- iput-boolean v0, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
- iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- if-nez v1, :cond_0
- iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isOpen()Z
- move-result v0
- invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
- goto :goto_0
- :cond_0
- new-instance v1, Ljava/util/ArrayList;
- invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
- iget-object v2, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- invoke-interface {v1, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- const/4 v2, 0x0
- invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- invoke-interface {v1, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
- iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- :goto_0
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- if-nez v0, :cond_1
- iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v0, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {p1, v0}, Lokhttp3/internal/http2/Http2Connection;->removeStream(I)Lokhttp3/internal/http2/Http2Stream;
- :cond_1
- return-void
- :catchall_0
- move-exception p1
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method declared-synchronized receiveRstStream(Lokhttp3/internal/http2/ErrorCode;)V
- .locals 1
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- if-nez v0, :cond_0
- iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- :cond_0
- monitor-exit p0
- return-void
- :catchall_0
- move-exception p1
- monitor-exit p0
- throw p1
- .end method
- .method public sendResponseHeaders(Ljava/util/List;Z)V
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;Z)V"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- if-eqz p1, :cond_2
- const/4 v0, 0x0
- monitor-enter p0
- const/4 v1, 0x1
- :try_start_0
- iput-boolean v1, p0, Lokhttp3/internal/http2/Http2Stream;->hasResponseHeaders:Z
- if-nez p2, :cond_0
- iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->sink:Lokhttp3/internal/http2/Http2Stream$FramingSink;
- iput-boolean v1, p2, Lokhttp3/internal/http2/Http2Stream$FramingSink;->finished:Z
- const/4 v0, 0x1
- :cond_0
- monitor-exit p0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- iget-object p2, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- iget v1, p0, Lokhttp3/internal/http2/Http2Stream;->id:I
- invoke-virtual {p2, v1, v0, p1}, Lokhttp3/internal/http2/Http2Connection;->writeSynReply(IZLjava/util/List;)V
- if-eqz v0, :cond_1
- iget-object p1, p0, Lokhttp3/internal/http2/Http2Stream;->connection:Lokhttp3/internal/http2/Http2Connection;
- invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Connection;->flush()V
- :cond_1
- return-void
- :catchall_0
- move-exception p1
- :try_start_1
- monitor-exit p0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- :cond_2
- new-instance p1, Ljava/lang/NullPointerException;
- const-string p2, "responseHeaders == null"
- invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
- throw p1
- .end method
- .method public declared-synchronized takeResponseHeaders()Ljava/util/List;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Lokhttp3/internal/http2/Header;",
- ">;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- monitor-enter p0
- :try_start_0
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->isLocallyInitiated()Z
- move-result v0
- if-eqz v0, :cond_2
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_1
- :goto_0
- :try_start_1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- if-nez v0, :cond_0
- invoke-virtual {p0}, Lokhttp3/internal/http2/Http2Stream;->waitForIo()V
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- goto :goto_0
- :cond_0
- :try_start_2
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- if-eqz v0, :cond_1
- const/4 v1, 0x0
- iput-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->responseHeaders:Ljava/util/List;
- :try_end_2
- .catchall {:try_start_2 .. :try_end_2} :catchall_1
- monitor-exit p0
- return-object v0
- :cond_1
- :try_start_3
- new-instance v0, Lokhttp3/internal/http2/StreamResetException;
- iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V
- throw v0
- :catchall_0
- move-exception v0
- iget-object v1, p0, Lokhttp3/internal/http2/Http2Stream;->readTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- invoke-virtual {v1}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->exitAndThrowIfTimedOut()V
- throw v0
- :cond_2
- 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_3
- .catchall {:try_start_3 .. :try_end_3} :catchall_1
- :catchall_1
- move-exception v0
- monitor-exit p0
- goto :goto_2
- :goto_1
- throw v0
- :goto_2
- goto :goto_1
- .end method
- .method waitForIo()V
- .locals 1
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/InterruptedIOException;
- }
- .end annotation
- :try_start_0
- invoke-virtual {p0}, Ljava/lang/Object;->wait()V
- :try_end_0
- .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
- return-void
- :catch_0
- new-instance v0, Ljava/io/InterruptedIOException;
- invoke-direct {v0}, Ljava/io/InterruptedIOException;-><init>()V
- throw v0
- .end method
- .method public writeTimeout()Lokio/Timeout;
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream;->writeTimeout:Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
- return-object v0
- .end method
|