Enum ResponseStatus.Custom

    • Method Detail

      • values

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

        public static ResponseStatus.Custom 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
      • fromStatusCode

        public static ResponseStatus.Custom fromStatusCode​(int code)
        Convert a numerical status code into the corresponding CustomStatus.
        Parameters:
        code - the numerical status code.
        Returns:
        the matching Status or null is no matching Status is defined.
      • getStatusCode

        public int getStatusCode()
        Specified by:
        getStatusCode in interface javax.ws.rs.core.Response.StatusType
      • getFamily

        public javax.ws.rs.core.Response.Status.Family getFamily()
        Specified by:
        getFamily in interface javax.ws.rs.core.Response.StatusType
      • getReasonPhrase

        public String getReasonPhrase()
        Specified by:
        getReasonPhrase in interface javax.ws.rs.core.Response.StatusType