public class BadRequest extends ErrorResult
Result.Payload| Modifier and Type | Field and Description |
|---|---|
static BadRequest |
INSTANCE
The static instance of BadRequest result.
|
| Constructor and Description |
|---|
BadRequest() |
BadRequest(int errorCode) |
BadRequest(int errorCode,
String message,
Object... args) |
BadRequest(int errorCode,
Throwable cause) |
BadRequest(int errorCode,
Throwable cause,
String message,
Object... args) |
BadRequest(String message,
Object... args) |
BadRequest(Throwable cause) |
BadRequest(Throwable cause,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
static BadRequest |
get()
Returns a static BadRequest instance and set the
Result.payload thread local
with default message. |
static BadRequest |
of(int errorCode)
Returns a static BadRequest instance and set the
Result.payload thread local
with default message. |
static BadRequest |
of(int errorCode,
String message,
Object... args)
Returns a static BadRequest instance and set the
Result.payload thread local
with message specified. |
static BadRequest |
of(int errorCode,
Throwable cause,
String message,
Object... args)
Returns a static BadRequest instance and set the
Result.payload thread local
with message specified. |
static BadRequest |
of(String message,
Object... args)
Returns a static BadRequest instance and set the
Result.payload thread local
with message specified. |
_localizedErrorMsg, applyMessage, attach, attachment, attachment, defaultMessage, errorCode, getLocalizedMessage, of, of, of, of, of, of, of, toJsonString, toKVStore, toStringapply, applyAfterCommitHandler, applyBeforeCommitHandler, applyStatus, clearThreadLocals, payload, status, status, statusCodedoFillInStackTrace, fillInStackTraceaddSuppressed, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final BadRequest INSTANCE
public BadRequest()
public BadRequest(Throwable cause)
public BadRequest(int errorCode)
public BadRequest(int errorCode,
Throwable cause)
public static BadRequest get()
Result.payload thread local
with default message.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localpublic static BadRequest of(int errorCode)
Result.payload thread local
with default message.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localerrorCode - the app defined error codepublic static BadRequest of(String message, Object... args)
Result.payload thread local
with message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localmessage - the messageargs - the message argumentspublic static BadRequest of(int errorCode, String message, Object... args)
Result.payload thread local
with message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localerrorCode - app defined error codemessage - the messageargs - the message argumentspublic static BadRequest of(int errorCode, Throwable cause, String message, Object... args)
Result.payload thread local
with message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever
stored in the Result.payload thread localcause - the causeerrorCode - app defined error codemessage - the messageargs - the message argumentsCopyright © 2017. All Rights Reserved.