Package org.somda.sdc.dpws.http
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.somda.sdc.dpws.http.HttpException
- All Implemented Interfaces:
Serializable
Exception to convey HTTP status codes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpException(int statusCode) Creates an exception with an HTTP status code and empty message.HttpException(int statusCode, String message) Creates an exception with an HTTP status code and a message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpException
public HttpException(int statusCode) Creates an exception with an HTTP status code and empty message.Attention: the status code is not verified.
- Parameters:
statusCode- the status code to set.
-
HttpException
Creates an exception with an HTTP status code and a message.The status code is not verified!
- Parameters:
statusCode- the status code to set.message- the message that can be passed to an HTTP content body.
-
-
Method Details
-
getStatusCode
public int getStatusCode()
-