Enum StatusCode

    • Enum Constant Detail

      • CONTINUE

        public static final StatusCode CONTINUE
      • SWITCHING_PROTOCOLS

        public static final StatusCode SWITCHING_PROTOCOLS
      • EARLY_HINTS

        public static final StatusCode EARLY_HINTS
      • ACCEPTED

        public static final StatusCode ACCEPTED
      • NON_AUTHORITATIVE_INFORMATION

        public static final StatusCode NON_AUTHORITATIVE_INFORMATION
      • NO_CONTENT

        public static final StatusCode NO_CONTENT
      • RESET_CONTENT

        public static final StatusCode RESET_CONTENT
      • PARTIAL_CONTENT

        public static final StatusCode PARTIAL_CONTENT
      • MULTIPLE_CHOICES

        public static final StatusCode MULTIPLE_CHOICES
      • MOVED_PERMANENTLY

        public static final StatusCode MOVED_PERMANENTLY
      • SEE_OTHER

        public static final StatusCode SEE_OTHER
      • NOT_MODIFIED

        public static final StatusCode NOT_MODIFIED
      • TEMPORARY_REDIRECT

        public static final StatusCode TEMPORARY_REDIRECT
      • PERMANENT_REDIRECT

        public static final StatusCode PERMANENT_REDIRECT
      • BAD_REQUEST

        public static final StatusCode BAD_REQUEST
      • UNAUTHORIZED

        public static final StatusCode UNAUTHORIZED
      • PAYMENT_REQUIRED

        public static final StatusCode PAYMENT_REQUIRED
      • FORBIDDEN

        public static final StatusCode FORBIDDEN
      • NOT_FOUND

        public static final StatusCode NOT_FOUND
      • METHOD_NOT_ALLOWED

        public static final StatusCode METHOD_NOT_ALLOWED
      • NOT_ACCEPTABLE

        public static final StatusCode NOT_ACCEPTABLE
      • PROXY_AUTHENTICATION_REQUIRED

        public static final StatusCode PROXY_AUTHENTICATION_REQUIRED
      • REQUEST_TIMEOUT

        public static final StatusCode REQUEST_TIMEOUT
      • CONFLICT

        public static final StatusCode CONFLICT
      • LENGTH_REQUIRED

        public static final StatusCode LENGTH_REQUIRED
      • PRECONDITION_FAILED

        public static final StatusCode PRECONDITION_FAILED
      • CONTENT_TOO_LARGE

        public static final StatusCode CONTENT_TOO_LARGE
      • URI_TOO_LONG

        public static final StatusCode URI_TOO_LONG
      • UNSUPPORTED_MEDIA_TYPE

        public static final StatusCode UNSUPPORTED_MEDIA_TYPE
      • RANGE_NOT_SATISFIABLE

        public static final StatusCode RANGE_NOT_SATISFIABLE
      • EXPECTATION_FAILED

        public static final StatusCode EXPECTATION_FAILED
      • I_AM_A_TEAPOT

        public static final StatusCode I_AM_A_TEAPOT
      • MISDIRECTED_REQUEST

        public static final StatusCode MISDIRECTED_REQUEST
      • UNPROCESSABLE_CONTENT

        public static final StatusCode UNPROCESSABLE_CONTENT
      • FAILED_DEPENDENCY

        public static final StatusCode FAILED_DEPENDENCY
      • TOO_EARLY

        public static final StatusCode TOO_EARLY
      • UPGRADE_REQUIRED

        public static final StatusCode UPGRADE_REQUIRED
      • PRECONDITION_REQUIRED

        public static final StatusCode PRECONDITION_REQUIRED
      • TOO_MANY_REQUESTS

        public static final StatusCode TOO_MANY_REQUESTS
      • REQUEST_HEADER_FIELDS_TOO_LARGE

        public static final StatusCode REQUEST_HEADER_FIELDS_TOO_LARGE
      • Unavailable_For_Legal_Reasons

        public static final StatusCode Unavailable_For_Legal_Reasons
      • INTERNAL_SERVER_ERROR

        public static final StatusCode INTERNAL_SERVER_ERROR
      • NOT_IMPLEMENTED

        public static final StatusCode NOT_IMPLEMENTED
      • BAD_GATEWAY

        public static final StatusCode BAD_GATEWAY
      • SERVICE_UNAVAILABLE

        public static final StatusCode SERVICE_UNAVAILABLE
      • HTTP_VERSION_NOT_SUPPORTED

        public static final StatusCode HTTP_VERSION_NOT_SUPPORTED
      • VARIANT_ALSO_NEGOTIATES

        public static final StatusCode VARIANT_ALSO_NEGOTIATES
      • INSUFFICIENT_STORAGE

        public static final StatusCode INSUFFICIENT_STORAGE
      • LOOP_DETECTED

        public static final StatusCode LOOP_DETECTED
      • NOT_EXTENDED

        public static final StatusCode NOT_EXTENDED
      • Network_Authentication_Required

        public static final StatusCode Network_Authentication_Required
    • Method Detail

      • values

        public static StatusCode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (StatusCode c : StatusCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static StatusCode valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getStatusCode

        public int getStatusCode()
      • getStatusMessage

        public String getStatusMessage()
      • fromCode

        public static StatusCode fromCode​(int code)
        Returns the enum StatusCode which matches the specified http status code.
        Parameters:
        code - code
        Returns:
        The matching StatusCode or null if none matches.