Package org.apache.jena.atlas.web
Class HttpException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.apache.jena.atlas.web.HttpException
-
- All Implemented Interfaces:
java.io.Serializable
public class HttpException extends java.lang.RuntimeExceptionClass of HTTP Exceptions from Atlas code- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpException(int statusCode, java.lang.String statusLine, java.lang.String response)HttpException(java.lang.String message)HttpException(java.lang.String message, java.lang.Throwable cause)HttpException(java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetResponse()The response payload from the remote.intgetStatusCode()Gets the status code, may be -1 if unknownjava.lang.StringgetStatusLine()Gets the status line text, may be null if unknown.
-
-
-
Constructor Detail
-
HttpException
public HttpException(int statusCode, java.lang.String statusLine, java.lang.String response)
-
HttpException
public HttpException(java.lang.String message)
-
HttpException
public HttpException(java.lang.String message, java.lang.Throwable cause)
-
HttpException
public HttpException(java.lang.Throwable cause)
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Gets the status code, may be -1 if unknown- Returns:
- Status Code if known, -1 otherwise
-
getStatusLine
public java.lang.String getStatusLine()
Gets the status line text, may be null if unknown. HTTP/2 does not have status line text.- Returns:
- Status line
-
getResponse
public java.lang.String getResponse()
The response payload from the remote.- Returns:
- The payload, or null if no payload
-
-