Package org.zalando.problem
Class AbstractThrowableProblem
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.zalando.problem.ThrowableProblem
-
- org.zalando.problem.AbstractThrowableProblem
-
- All Implemented Interfaces:
Serializable,Exceptional,Problem
- Direct Known Subclasses:
DefaultProblem
@API(status=STABLE) @Immutable public abstract class AbstractThrowableProblem extends ThrowableProblem
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.zalando.problem.Problem
DEFAULT_TYPE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractThrowableProblem()protectedAbstractThrowableProblem(URI type)protectedAbstractThrowableProblem(URI type, String title)protectedAbstractThrowableProblem(URI type, String title, StatusType status)protectedAbstractThrowableProblem(URI type, String title, StatusType status, String detail)protectedAbstractThrowableProblem(URI type, String title, StatusType status, String detail, URI instance)protectedAbstractThrowableProblem(URI type, String title, StatusType status, String detail, URI instance, ThrowableProblem cause)protectedAbstractThrowableProblem(URI type, String title, StatusType status, String detail, URI instance, ThrowableProblem cause, Map<String,Object> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDetail()A human readable explanation specific to this occurrence of the problem.URIgetInstance()An absolute URI that identifies the specific occurrence of the problem.Map<String,Object>getParameters()Optional, additional attributes of the problem.StatusTypegetStatus()The HTTP status code generated by the origin server for this occurrence of the problem.StringgetTitle()A short, human-readable summary of the problem type.URIgetType()An absolute URI that identifies the problem type.-
Methods inherited from class org.zalando.problem.ThrowableProblem
getCause, getMessage, toString
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zalando.problem.Exceptional
propagate, propagateAs
-
-
-
-
Constructor Detail
-
AbstractThrowableProblem
protected AbstractThrowableProblem()
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title, @Nullable StatusType status)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title, @Nullable StatusType status, @Nullable String detail)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title, @Nullable StatusType status, @Nullable String detail, @Nullable URI instance)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title, @Nullable StatusType status, @Nullable String detail, @Nullable URI instance, @Nullable ThrowableProblem cause)
-
AbstractThrowableProblem
protected AbstractThrowableProblem(@Nullable URI type, @Nullable String title, @Nullable StatusType status, @Nullable String detail, @Nullable URI instance, @Nullable ThrowableProblem cause, @Nullable Map<String,Object> parameters)
-
-
Method Detail
-
getType
public URI getType()
Description copied from interface:ProblemAn absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). When this member is not present, its value is assumed to be "about:blank".- Returns:
- an absolute URI that identifies this problem's type
-
getTitle
public String getTitle()
Description copied from interface:ProblemA short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localisation.- Returns:
- a short, human-readable summary of this problem
-
getStatus
public StatusType getStatus()
Description copied from interface:ProblemThe HTTP status code generated by the origin server for this occurrence of the problem.- Returns:
- the HTTP status code
-
getDetail
public String getDetail()
Description copied from interface:ProblemA human readable explanation specific to this occurrence of the problem.- Returns:
- A human readable explaination of this problem
-
getInstance
public URI getInstance()
Description copied from interface:ProblemAn absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.- Returns:
- an absolute URI that identifies this specific problem
-
-