Class Problem

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ClientProblem, DefaultProblem, ServerProblem

public abstract class Problem extends RuntimeException
Abstract base class for problems (RFC 9457). Maps to Problem in belgif/problem/v1/problem-v1.yaml.
See Also:
  • Constructor Details

    • Problem

      protected Problem(URI type, String title, int status)
    • Problem

      protected Problem(URI type, URI href, String title, int status)
    • Problem

      protected Problem(URI type, String title, int status, Throwable cause)
    • Problem

      protected Problem(URI type, URI href, String title, int status, Throwable cause)
  • Method Details

    • getStatus

      public int getStatus()
    • getType

      public URI getType()
    • getHref

      public URI getHref()
    • setHref

      public void setHref(URI href)
    • getTitle

      public String getTitle()
    • getDetail

      public String getDetail()
    • setDetail

      public void setDetail(String detail)
    • getInstance

      public URI getInstance()
    • setInstance

      public void setInstance(URI instance)
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
    • setAdditionalProperty

      public void setAdditionalProperty(String name, Object value)
    • getMessage

      public String getMessage()
      Returns the problem message, consisting of the problem title, followed by the detail message (if present).
      Overrides:
      getMessage in class Throwable
      Returns:
      the problem message
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object