Class HealthStatusHttpMapper

    • Method Detail

      • setStatusMapping

        public void setStatusMapping​(Map<String,​Integer> statusMapping)
        Set specific status mappings.
        Parameters:
        statusMapping - a map of health status code to HTTP status code
      • addStatusMapping

        public void addStatusMapping​(Map<String,​Integer> statusMapping)
        Add specific status mappings to the existing set.
        Parameters:
        statusMapping - a map of health status code to HTTP status code
      • addStatusMapping

        public void addStatusMapping​(Status status,
                                     Integer httpStatus)
        Add a status mapping to the existing set.
        Parameters:
        status - the status to map
        httpStatus - the http status
      • addStatusMapping

        public void addStatusMapping​(String statusCode,
                                     Integer httpStatus)
        Add a status mapping to the existing set.
        Parameters:
        statusCode - the status code to map
        httpStatus - the http status
      • getStatusMapping

        public Map<String,​IntegergetStatusMapping()
        Return an immutable view of the status mapping.
        Returns:
        the http status codes mapped by status name
      • mapStatus

        public int mapStatus​(Status status)
        Map the specified Status to an HTTP status code.
        Parameters:
        status - the health Status
        Returns:
        the corresponding HTTP status code