类 Exchange
java.lang.Object
com.lark.oapi.okhttp.internal.connection.Exchange
Transmits a single HTTP request and a response pair. This layers connection management and events
on
ExchangeCodec, which handles the actual I/O.-
构造器概要
构造器构造器说明Exchange(Transmitter transmitter, Call call, EventListener eventListener, com.lark.oapi.okhttp.internal.connection.ExchangeFinder finder, ExchangeCodec codec) -
方法概要
修饰符和类型方法说明voidcancel()createRequestBody(Request request, boolean duplex) voidRevoke this exchange's access to streams.voidvoidbooleanisDuplex()Returns true if the request body need not complete before the response body starts.voidvoidopenResponseBody(Response response) readResponseHeaders(boolean expectContinue) voidresponseHeadersEnd(Response response) voidvoidtrailers()voidvoidwriteRequestHeaders(Request request)
-
构造器详细资料
-
Exchange
public Exchange(Transmitter transmitter, Call call, EventListener eventListener, com.lark.oapi.okhttp.internal.connection.ExchangeFinder finder, ExchangeCodec codec)
-
-
方法详细资料
-
connection
-
isDuplex
public boolean isDuplex()Returns true if the request body need not complete before the response body starts. -
writeRequestHeaders
- 抛出:
IOException
-
createRequestBody
- 抛出:
IOException
-
flushRequest
- 抛出:
IOException
-
finishRequest
- 抛出:
IOException
-
responseHeadersStart
public void responseHeadersStart() -
readResponseHeaders
- 抛出:
IOException
-
responseHeadersEnd
-
openResponseBody
- 抛出:
IOException
-
trailers
- 抛出:
IOException
-
timeoutEarlyExit
public void timeoutEarlyExit() -
newWebSocketStreams
- 抛出:
SocketException
-
webSocketUpgradeFailed
public void webSocketUpgradeFailed() -
noNewExchangesOnConnection
public void noNewExchangesOnConnection() -
cancel
public void cancel() -
detachWithViolence
public void detachWithViolence()Revoke this exchange's access to streams. This is necessary when a follow-up request is required but the preceding exchange hasn't completed yet. -
noRequestBody
public void noRequestBody()
-