Class Transmitter

java.lang.Object
org.miaixz.bus.http.accord.Transmitter

public class Transmitter extends Object
在Http的应用程序层和网络层之间建立桥梁 该类公开:连接、请求、响应和流
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • connection

      public RealConnection connection
      有connectionPool守卫
  • Constructor Details

    • Transmitter

      public Transmitter(Httpd client, NewCall call)
  • Method Details

    • timeout

      public org.miaixz.bus.core.io.timout.Timeout timeout()
    • timeoutEnter

      public void timeoutEnter()
    • timeoutEarlyExit

      public void timeoutEarlyExit()
      在调用完全完成之前停止应用超时 这用于WebSockets和双工调用,其中超时只适用于初始设置
    • callStart

      public void callStart()
    • prepareToConnect

      public void prepareToConnect(Request request)
      Prepare to create a stream to carry request. This prefers to use the existing connection if it exists.
    • exchangeDoneDueToException

      public void exchangeDoneDueToException()
    • noMoreExchanges

      public IOException noMoreExchanges(IOException e)
    • canRetry

      public boolean canRetry()
    • hasExchange

      public boolean hasExchange()
    • cancel

      public void cancel()
      Immediately closes the socket connection if it's currently held. Use this to interrupt an in-flight request from any thread. It's the caller's responsibility to close the request body and response body streams; otherwise resources may be leaked. This method is safe to be called concurrently, but provides limited guarantees. If a transport layer connection has been established (such as a HTTP/2 stream) that is terminated. Otherwise if a socket connection is being established, that is terminated.
    • isCanceled

      public boolean isCanceled()