Serializable
, Comparable<HttpExceptionHandling>
public enum HttpExceptionHandling extends Enum<HttpExceptionHandling>
HttpRequest
or a HttpResponse
along with the according
sub-classes. Usually the following fields are written into the HTTP-Body (if
possible): "timestamp", "status", "error": "Bad Request", "exception" and
"message". Usually the causing exception's message is used for the "message"
attribute: Make sure you do not reveal any sensible information in the
exception's message.Enum Constant | Description |
---|---|
EMPTY |
Create a new HTTP-Response with the according HTTP-Status-Code and and an
empty body.
|
KEEP |
Do not modify the so far processed HTTP-Response except update the actual
HTTP-Status-Code.
|
MERGE |
Keep the so far processed HTTP-Response as is except update the actual
HTTP-Status-Code, add only non-existing fields if possible with the error
description fields.
|
REPLACE |
Create a new HTTP-Response with the according HTTP-Status-Code and the
error description fields.
|
UPDATE |
Keep the so far processed HTTP-Response as is except the HTTP-Status-Code
and also update all error description fields.
|
Modifier and Type | Method | Description |
---|---|---|
static HttpExceptionHandling |
valueOf(String name) |
Returns the enum constant of this type with the specified name.
|
static HttpExceptionHandling[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HttpExceptionHandling KEEP
public static final HttpExceptionHandling MERGE
public static final HttpExceptionHandling UPDATE
public static final HttpExceptionHandling REPLACE
public static final HttpExceptionHandling EMPTY
public static HttpExceptionHandling[] values()
for (HttpExceptionHandling c : HttpExceptionHandling.values()) System.out.println(c);
public static HttpExceptionHandling valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2021. All rights reserved.