Class HttpException

  • All Implemented Interfaces:
    java.io.Serializable

    public class HttpException
    extends AbstractRuntimeException
    Thrown when there was an HTTP or communications error between the client and server. See the exception message for more specific information (if available).
    Since:
    1.1
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpException​(int statusCode, java.lang.String message)
      Constructs an HttpException with the specified HTTP status code and message.
      HttpException​(int statusCode, java.lang.String message, java.lang.Throwable cause)
      Constructs an HttpException with the specified HTTP status code, message and cause.
      HttpException​(java.lang.String message)
      Constructs an HttpException with the specified message.
      HttpException​(java.lang.String message, java.lang.Throwable cause)
      Constructs an HttpException with the specified message and cause.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getStatusCode()
      Return the HTTP status code associated with this exception, if one exists.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • HttpException

        public HttpException​(java.lang.String message)
        Constructs an HttpException with the specified message.
        Parameters:
        message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
      • HttpException

        public HttpException​(int statusCode,
                             java.lang.String message)
        Constructs an HttpException with the specified HTTP status code and message.
        Parameters:
        statusCode - the HTTP status code
        message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
      • HttpException

        public HttpException​(int statusCode,
                             java.lang.String message,
                             java.lang.Throwable cause)
        Constructs an HttpException with the specified HTTP status code, message and cause.
        Parameters:
        statusCode - the HTTP status code
        message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
        cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
      • HttpException

        public HttpException​(java.lang.String message,
                             java.lang.Throwable cause)
        Constructs an HttpException with the specified message and cause.
        Parameters:
        message - the detail message (which is saved for later retrieval by the AbstractRuntimeException.getMessage() method).
        cause - the cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
    • Method Detail

      • getStatusCode

        public int getStatusCode()
        Return the HTTP status code associated with this exception, if one exists.
        Returns:
        the HTTP status code associated with this exception, if one exists.