Class HttpStatus


  • public class HttpStatus
    extends java.lang.Object
    HTTP status.
    Author:
    Daniel Sagenschneider
    • Field Detail

      • CONTINUE

        public static final HttpStatus CONTINUE
      • SWITCHING_PROTOCOLS

        public static final HttpStatus SWITCHING_PROTOCOLS
      • ACCEPTED

        public static final HttpStatus ACCEPTED
      • NON_AUTHORITATIVE_INFORMATION

        public static final HttpStatus NON_AUTHORITATIVE_INFORMATION
      • NO_CONTENT

        public static final HttpStatus NO_CONTENT
      • RESET_CONTENT

        public static final HttpStatus RESET_CONTENT
      • PARTIAL_CONTENT

        public static final HttpStatus PARTIAL_CONTENT
      • MULTIPLE_CHOICES

        public static final HttpStatus MULTIPLE_CHOICES
      • MOVED_PERMANENTLY

        public static final HttpStatus MOVED_PERMANENTLY
      • SEE_OTHER

        public static final HttpStatus SEE_OTHER
      • NOT_MODIFIED

        public static final HttpStatus NOT_MODIFIED
      • USE_PROXY

        public static final HttpStatus USE_PROXY
      • TEMPORARY_REDIRECT

        public static final HttpStatus TEMPORARY_REDIRECT
      • BAD_REQUEST

        public static final HttpStatus BAD_REQUEST
      • UNAUTHORIZED

        public static final HttpStatus UNAUTHORIZED
      • PAYMENT_REQUIRED

        public static final HttpStatus PAYMENT_REQUIRED
      • FORBIDDEN

        public static final HttpStatus FORBIDDEN
      • NOT_FOUND

        public static final HttpStatus NOT_FOUND
      • METHOD_NOT_ALLOWED

        public static final HttpStatus METHOD_NOT_ALLOWED
      • NOT_ACCEPTABLE

        public static final HttpStatus NOT_ACCEPTABLE
      • PROXY_AUTHENTICATION_REQUIRED

        public static final HttpStatus PROXY_AUTHENTICATION_REQUIRED
      • REQUEST_TIME_OUT

        public static final HttpStatus REQUEST_TIME_OUT
      • CONFLICT

        public static final HttpStatus CONFLICT
      • LENGTH_REQUIRED

        public static final HttpStatus LENGTH_REQUIRED
      • PRECONDITION_FAILED

        public static final HttpStatus PRECONDITION_FAILED
      • REQUEST_ENTITY_TOO_LARGE

        public static final HttpStatus REQUEST_ENTITY_TOO_LARGE
      • REQUEST_URI_TOO_LARGE

        public static final HttpStatus REQUEST_URI_TOO_LARGE
      • UNSUPPORTED_MEDIA_TYPE

        public static final HttpStatus UNSUPPORTED_MEDIA_TYPE
      • REQUESTED_RANGE_NOT_SATISFIABLE

        public static final HttpStatus REQUESTED_RANGE_NOT_SATISFIABLE
      • EXPECTATION_FAILED

        public static final HttpStatus EXPECTATION_FAILED
      • INTERNAL_SERVER_ERROR

        public static final HttpStatus INTERNAL_SERVER_ERROR
      • NOT_IMPLEMENTED

        public static final HttpStatus NOT_IMPLEMENTED
      • BAD_GATEWAY

        public static final HttpStatus BAD_GATEWAY
      • SERVICE_UNAVAILABLE

        public static final HttpStatus SERVICE_UNAVAILABLE
      • GATEWAY_TIME_OUT

        public static final HttpStatus GATEWAY_TIME_OUT
      • HTTP_VERSION_NOT_SUPPORTED

        public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED
    • Constructor Detail

      • HttpStatus

        public HttpStatus​(int statusCode,
                          java.lang.String statusMessage)
        Instantiate a dynamic HttpStatus.
        Parameters:
        statusCode - Status code.
        statusMessage - Status message.
    • Method Detail

      • getHttpStatus

        public static HttpStatus getHttpStatus​(int statusCode)
        Obtains the HttpStatus for the status code.
        Parameters:
        statusCode - Status code.
        Returns:
        HttpStatus.
      • isEqual

        public boolean isEqual​(HttpStatus httpStatus)
        Equals without the type checking.
        Parameters:
        httpStatus - HttpStatus.
        Returns:
        true if same HttpStatus.
      • getStatusCode

        public int getStatusCode()
        Obtains the status code.
        Returns:
        Status code.
      • getStatusMessage

        public java.lang.String getStatusMessage()
        Obtains the status message.
        Returns:
        Status message.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object