Http2Stream$StreamTimeout.smali 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .class Lokhttp3/internal/http2/Http2Stream$StreamTimeout;
  2. .super Lokio/AsyncTimeout;
  3. .source ""
  4. # annotations
  5. .annotation system Ldalvik/annotation/EnclosingClass;
  6. value = Lokhttp3/internal/http2/Http2Stream;
  7. .end annotation
  8. .annotation system Ldalvik/annotation/InnerClass;
  9. accessFlags = 0x0
  10. name = "StreamTimeout"
  11. .end annotation
  12. # instance fields
  13. .field final synthetic this$0:Lokhttp3/internal/http2/Http2Stream;
  14. # direct methods
  15. .method constructor <init>(Lokhttp3/internal/http2/Http2Stream;)V
  16. .locals 0
  17. iput-object p1, p0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->this$0:Lokhttp3/internal/http2/Http2Stream;
  18. invoke-direct {p0}, Lokio/AsyncTimeout;-><init>()V
  19. return-void
  20. .end method
  21. # virtual methods
  22. .method public exitAndThrowIfTimedOut()V
  23. .locals 1
  24. .annotation system Ldalvik/annotation/Throws;
  25. value = {
  26. Ljava/io/IOException;
  27. }
  28. .end annotation
  29. invoke-virtual {p0}, Lokio/AsyncTimeout;->exit()Z
  30. move-result v0
  31. if-nez v0, :cond_0
  32. return-void
  33. :cond_0
  34. const/4 v0, 0x0
  35. invoke-virtual {p0, v0}, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
  36. move-result-object v0
  37. throw v0
  38. .end method
  39. .method protected newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException;
  40. .locals 2
  41. new-instance v0, Ljava/net/SocketTimeoutException;
  42. const-string v1, "timeout"
  43. invoke-direct {v0, v1}, Ljava/net/SocketTimeoutException;-><init>(Ljava/lang/String;)V
  44. if-eqz p1, :cond_0
  45. invoke-virtual {v0, p1}, Ljava/net/SocketTimeoutException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
  46. :cond_0
  47. return-object v0
  48. .end method
  49. .method protected timedOut()V
  50. .locals 2
  51. iget-object v0, p0, Lokhttp3/internal/http2/Http2Stream$StreamTimeout;->this$0:Lokhttp3/internal/http2/Http2Stream;
  52. sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
  53. invoke-virtual {v0, v1}, Lokhttp3/internal/http2/Http2Stream;->closeLater(Lokhttp3/internal/http2/ErrorCode;)V
  54. return-void
  55. .end method