larksuite-oapi/src/main/java/com/larksuite/oapi/okhttp3_14/internal/connection/Transmitter.java
Exchange newExchange(Interceptor.Chain chain, boolean doExtensiveHealthChecks) {
    synchronized (connectionPool) {
      if (noMoreExchanges) {
        throw new IllegalStateException("released");
      }
      if (exchange != null) {
        throw new IllegalStateException("cannot make a new request because the previous response "
            + "is still open: please call response.close()");
      }
    }

    ExchangeCodec codec = exchangeFinder.find(client, chain, doExtensiveHealthChecks);
    Exchange result = new Exchange(this, call, eventListener, exchangeFinder, codec);

    synchronized (connectionPool) {
      this.exchange = result;
      this.exchangeRequestDone = false;
      this.exchangeResponseDone = false;
      return result;
    }
  }
/** Returns a new exchange to carry a new request and response. */
Returns a new exchange to carry a new request and response.
Returns a new exchange to carry a new request and response .
Exchange newExchange(Interceptor.Chain chain, boolean doExtensiveHealthChecks) {
    synchronized (connectionPool) {
      if (noMoreExchanges) {
        throw new IllegalStateException("released");
      }
      if (exchange != null) {
        throw new IllegalStateException("cannot make a new request because the previous response "
            + "is still open: please call response.close()");
      }
    }
    ExchangeCodec codec = exchangeFinder.find(client, chain, doExtensiveHealthChecks);
    Exchange result = new Exchange(this, call, eventListener, exchangeFinder, codec);
    synchronized (connectionPool) {
      this.exchange = result;
      this.exchangeRequestDone = false;
      this.exchangeResponseDone = false;
      return result;
    }
  }
Exchange newExchange ( Interceptor . Chain chain , boolean doExtensiveHealthChecks ) { synchronized ( connectionPool ) { if ( noMoreExchanges ) { throw new IllegalStateException ( "released" ) ; } if ( exchange != null ) { throw new IllegalStateException ( "cannot make a new request because the previous response " + "is still open: please call response.close()" ) ; } } ExchangeCodec codec = exchangeFinder . find ( client , chain , doExtensiveHealthChecks ) ; Exchange result = new Exchange ( this , call , eventListener , exchangeFinder , codec ) ; synchronized ( connectionPool ) { this . exchange = result ; this . exchangeRequestDone = false ; this . exchangeResponseDone = false ; return result ; } }
Returns a new exchange to carry a new request and response.
Returns a new exchange to carry a new request and response .