public final class RetryAndFollowUp extends Object implements Interceptor
IOExceptionInterceptor.Chain| Constructor and Description |
|---|
RetryAndFollowUp(Httpd client,
boolean forWebSocket) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
如果当前持有套接字连接,则立即关闭它。使用它来中断来自任何线程的正在运行的请求
关闭请求体和响应体流是调用方的职责;否则,资源可能会泄露
此方法可以安全地并发调用,但提供了有限的保证。如果已建立传输层连接(如HTTP/2流),
则终止该连接。否则,如果正在建立套接字连接,则终止该连接.
|
Response |
intercept(Interceptor.Chain chain) |
boolean |
isCanceled() |
void |
setCallStackTrace(Object callStackTrace) |
StreamAllocation |
streamAllocation() |
public RetryAndFollowUp(Httpd client, boolean forWebSocket)
public void cancel()
public boolean isCanceled()
public void setCallStackTrace(Object callStackTrace)
public StreamAllocation streamAllocation()
public Response intercept(Interceptor.Chain chain) throws IOException
intercept in interface InterceptorIOExceptionCopyright © 2019. All rights reserved.