Enum HttpSuccessCode

    • Enum Constant Detail

      • CREATED

        public static final HttpSuccessCode CREATED
        201 Created (HTTP/1.0 - RFC 1945)
      • ACCEPTED

        public static final HttpSuccessCode ACCEPTED
        202 Accepted (HTTP/1.0 - RFC 1945)
      • NON_AUTHORITATIVE_INFORMATION

        public static final HttpSuccessCode NON_AUTHORITATIVE_INFORMATION
        203 Non Authoritative Information (HTTP/1.1 - RFC 2616)
      • NO_CONTENT

        public static final HttpSuccessCode NO_CONTENT
        204 No Content (HTTP/1.0 - RFC 1945)
      • RESET_CONTENT

        public static final HttpSuccessCode RESET_CONTENT
        205 Reset Content (HTTP/1.1 - RFC 2616)
      • PARTIAL_CONTENT

        public static final HttpSuccessCode PARTIAL_CONTENT
        206 Partial Content (HTTP/1.1 - RFC 2616)
      • MULTI_STATUS

        public static final HttpSuccessCode MULTI_STATUS
        207 Multi-Status (WebDAV - RFC 2518) or 207 Partial Update OK (HTTP/1.1 - draft-ietf-http-v11-spec-rev-01?)
    • Method Detail

      • values

        public static HttpSuccessCode[] 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 (HttpSuccessCode c : HttpSuccessCode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static HttpSuccessCode 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 Integer getStatusCode​()
        Specified by:
        getStatusCode in interface org.refcodes.mixin.StatusCodeAccessor<Integer>
      • toHttpSuccessCode

        public static HttpSuccessCode toHttpSuccessCode​(int aHttpStatusCode)
        Determines the HTTP success code from the given value by evaluating the getStatusCode() property.
        Parameters:
        aHttpStatusCode - The code from which to get the HttpStatusCode element.
        Returns:
        The according HttpStatusCode element or null if none was found.
      • toHttpSuccessCode

        public static HttpSuccessCode toHttpSuccessCode​(org.refcodes.mixin.StatusCodeAccessor<Integer> aHttpStatusCode)
        Determines the HTTP success code from the given HTTP Status-Code property by evaluating the getStatusCode() property.
        Parameters:
        aHttpStatusCode - The code property from which StatusCodeAccessor.getStatusCode() to get the HttpStatusCode element.
        Returns:
        The according HttpStatusCode element or null if none was found.