Package ro.sync.net.protocol.http
Class HttpExceptionWithDetails
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
ro.sync.basic.net.http.HttpException
ro.sync.net.protocol.http.HttpExceptionWithDetails
- All Implemented Interfaces:
Serializable
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public class HttpExceptionWithDetails
extends ro.sync.basic.net.http.HttpException
HTTP Exception with details.
- Since:
- 25.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpExceptionWithDetails
(String message, int reasonCode, String reason, URL baseURL) ConstructorHttpExceptionWithDetails
(String message, int reasonCode, String reason, URL baseURL, ro.sync.net.protocol.http.abstraction.HttpResponse httpResponse) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGets the base URL.ro.sync.net.protocol.http.abstraction.HttpResponse
Gets the httpResponse.void
setBaseURL
(URL baseURL) Set the URL for which the message is reported.void
setHttpResponse
(ro.sync.net.protocol.http.abstraction.HttpResponse httpResponse) Sets the httpResponse.Methods inherited from class ro.sync.basic.net.http.HttpException
getReasonCode, setReason, setReasonCode
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpExceptionWithDetails
Constructor- Parameters:
message
- The message.reasonCode
- The reason status code.reason
- The reason text.baseURL
- The URL for which the message is reported.
-
HttpExceptionWithDetails
public HttpExceptionWithDetails(String message, int reasonCode, String reason, URL baseURL, ro.sync.net.protocol.http.abstraction.HttpResponse httpResponse) Constructor- Parameters:
message
- The message.reasonCode
- The reason status code.reason
- The reason text.baseURL
- The URL for which the message is reported.httpResponse
- The httpResponse of the request that threw this HttpException.
-
-
Method Details
-
setBaseURL
Set the URL for which the message is reported.- Parameters:
baseURL
- The URL for which the message is reported.
-
getBaseURL
Gets the base URL.- Returns:
- The base URL.
-
setHttpResponse
public void setHttpResponse(ro.sync.net.protocol.http.abstraction.HttpResponse httpResponse) Sets the httpResponse.- Parameters:
httpResponse
- The httpResponse to set.
-
getHttpResponse
public ro.sync.net.protocol.http.abstraction.HttpResponse getHttpResponse()Gets the httpResponse.- Returns:
- Returns the httpResponse.
-
getReason
- Overrides:
getReason
in classro.sync.basic.net.http.HttpException
- Returns:
- Returns the reason given by the server.
-