java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.jena.atlas.web.HttpException
- All Implemented Interfaces:
Serializable
Class of HTTP Exceptions
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHttpException(int statusCode) Deprecated, for removal: This API element is subject to removal in a future version.HttpException(int statusCode, String statusLine) Deprecated, for removal: This API element is subject to removal in a future version.Usebuilder()HttpException(int statusCode, String statusLine, String responseMessage) Deprecated, for removal: This API element is subject to removal in a future version.Usecreate(HttpResponse)orbuilder()HttpException(int statusCode, String statusLine, String responseMessage, Throwable cause) Deprecated, for removal: This API element is subject to removal in a future version.Usecreate(HttpResponse)orbuilder()HttpException(String message) Deprecated.Useerror(String)HttpException(String message, Throwable cause) Deprecated.HttpException(Throwable cause) Deprecated.Usebuilder() -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpException.Builderbuilder()static HttpExceptioncreate(int httpStatusCode) HTTP errorstatic HttpExceptioncreate(HttpResponse<?> response) HTTP errorstatic HttpExceptioncreate(HttpException other) Replicate the details of anHttpException; the stacktrace will be the callers location.static HttpExceptionSystem error setting up the HTTP requeststatic HttpExceptionSystem error setting up the HTTP requestThe response headers.The response payload from the remote.intGets the status code, may be -1 if unknownGets the status line text, may be null if unknown.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
Deprecated, for removal: This API element is subject to removal in a future version.Usecreate(int) -
HttpException
Deprecated, for removal: This API element is subject to removal in a future version.Usebuilder() -
HttpException
@Deprecated(forRemoval=true) public HttpException(int statusCode, String statusLine, String responseMessage) Deprecated, for removal: This API element is subject to removal in a future version.Usecreate(HttpResponse)orbuilder() -
HttpException
@Deprecated(forRemoval=true) public HttpException(int statusCode, String statusLine, String responseMessage, Throwable cause) Deprecated, for removal: This API element is subject to removal in a future version.Usecreate(HttpResponse)orbuilder() -
HttpException
Deprecated.Useerror(String) -
HttpException
Deprecated. -
HttpException
Deprecated.Usebuilder()
-
-
Method Details
-
error
System error setting up the HTTP request -
error
System error setting up the HTTP request -
create
HTTP error -
create
HTTP error -
create
Replicate the details of anHttpException; the stacktrace will be the callers location. -
builder
-
getStatusCode
public int getStatusCode()Gets the status code, may be -1 if unknown- Returns:
- Status Code if known, -1 otherwise
-
getStatusLine
Gets the status line text, may be null if unknown. HTTP/2 does not have status line text; the default HTTP 1.1 message is returned.- Returns:
- Status line
-
getResponse
The response payload from the remote.- Returns:
- The payload, or null if no payload
-
getHttpResponseHeaders
The response headers.
-
create(int)