public class Status extends Object
1. low latency as server will return the first error without further processing 2. limited attack risks and make the error handling harder to analyzed
| Modifier and Type | Field and Description |
|---|---|
static Map<String,Object> |
config |
static String |
CONFIG_NAME |
static String |
defaultSeverity |
| Constructor and Description |
|---|
Status()
Default construction that is only used in reflection.
|
Status(HttpStatus httpStatus,
String message,
String description)
Construct a status object based on all the properties in the object.
|
Status(int statusCode,
String code,
String message,
String description)
Construct a status object based on all the properties in the object.
|
Status(int statusCode,
String code,
String message,
String description,
String severity)
Construct a status object based on all the properties in the object.
|
Status(String code,
Object... args)
Construct a status object based on error code and a list of arguments.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCode() |
String |
getDescription() |
String |
getMessage() |
String |
getSeverity() |
int |
getStatusCode() |
void |
setCode(String code) |
void |
setDescription(String description) |
void |
setMessage(String message) |
void |
setSeverity(String severity) |
void |
setStatusCode(int statusCode) |
String |
toString() |
public static final String CONFIG_NAME
public static final String defaultSeverity
public Status()
public Status(String code, Object... args)
code - Error Codeargs - A list of arguments that will be populated into the error descriptionpublic Status(int statusCode,
String code,
String message,
String description)
statusCode - Status Codecode - Codemessage - Messagedescription - Descriptionpublic Status(HttpStatus httpStatus, String message, String description)
httpStatus - HttpStatusmessage - Messagedescription - Descriptionpublic Status(int statusCode,
String code,
String message,
String description,
String severity)
statusCode - Status Codecode - Codeseverity - Status Severitymessage - Messagedescription - Descriptionpublic int getStatusCode()
public void setStatusCode(int statusCode)
public String getCode()
public void setCode(String code)
public String getMessage()
public void setMessage(String message)
public String getDescription()
public void setDescription(String description)
public void setSeverity(String severity)
public String getSeverity()
Copyright © 2022. All rights reserved.