public class HttpRetryException extends IOException
Constructor and Description |
---|
HttpRetryException(String detail, int code)
从指定的响应代码和异常详细信息构造一个新的
HttpRetryException
|
HttpRetryException(String detail, int code, String location)
构造一个新的
HttpRetryException 与详细的message responseCode和Location响应头域的内容。
|
Modifier and Type | Method and Description |
---|---|
String |
getLocation()
如果由重定向导致错误,则返回“位置”头域的值。
|
String |
getReason()
返回一个字符串,解释为什么不能重试http请求。
|
int |
responseCode()
返回http响应代码
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HttpRetryException(String detail, int code)
HttpRetryException
detail
- 详细信息。
code
- 来自服务器的HTTP响应代码。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.