public class Forbidden extends ErrorResult
HTTP 403 Forbidden
Result.Payload| Modifier and Type | Field and Description |
|---|---|
static Forbidden |
INSTANCE
The static instance of Forbidden result.
|
| Constructor and Description |
|---|
Forbidden() |
Forbidden(int errorCode) |
Forbidden(int errorCode,
String message,
Object... args) |
Forbidden(int errorCode,
Throwable cause) |
Forbidden(int errorCode,
Throwable cause,
String message,
Object... args) |
Forbidden(String message,
Object... args) |
Forbidden(Throwable cause) |
Forbidden(Throwable cause,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
static Forbidden |
get()
Returns a static Forbidden instance and set the
Result.payload thread local with default message. |
static Forbidden |
of(int errorCode)
Returns a static Forbidden instance and set the
Result.payload thread local with error code and default message. |
static Forbidden |
of(int errorCode,
String message,
Object... args)
Returns a static Forbidden instance and set the
Result.payload thread local with error code and message specified. |
static Forbidden |
of(int errorCode,
Throwable cause)
Returns a static Forbidden instance and set the
Result.payload thread local with error code and cause specified |
static Forbidden |
of(int errorCode,
Throwable cause,
String message,
Object... args)
Returns a static Forbidden instance and set the
Result.payload thread local with error code, cause and message specified. |
static Forbidden |
of(String message,
Object... args)
Returns a static Forbidden instance and set the
Result.payload thread local with message specified. |
static Forbidden |
of(Throwable cause)
Returns a static Forbidden instance and set the
Result.payload thread local with cause specified. |
static Forbidden |
of(Throwable cause,
int errorCode)
Deprecated.
|
static Forbidden |
of(Throwable cause,
int errorCode,
String message,
Object... args)
Deprecated.
|
static Forbidden |
of(Throwable cause,
String message,
Object... args)
Returns a static Forbidden instance and set the
Result.payload thread local with cause and message specified. |
_localizedErrorMsg, applyMessage, attach, attachment, attachment, defaultMessage, errorCode, errorCode, getLocalizedMessage, of, of, of, of, of, of, of, toJsonString, toKVStore, toStringaddCookie, addHeader, apply, applyAfterCommitHandler, applyBeforeCommitHandler, applyCookies, applyHeaders, applyStatus, clearThreadLocals, header, payload, status, status, statusCode, timestamp, touchPayloaddoFillInStackTrace, fillInStackTraceaddSuppressed, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic static final Forbidden INSTANCE
The static instance of Forbidden result.
public Forbidden()
public Forbidden(int errorCode)
public Forbidden(Throwable cause)
public Forbidden(int errorCode,
Throwable cause)
public static Forbidden get()
Returns a static Forbidden instance and set the 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 local
public static Forbidden of(String message, Object... args)
Returns a static Forbidden instance and set the 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 local
message - the messageargs - the message argumentspublic static Forbidden of(Throwable cause)
Returns a static Forbidden instance and set the Result.payload thread local with cause specified.
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
cause - the causepublic static Forbidden of(Throwable cause, String message, Object... args)
Returns a static Forbidden instance and set the Result.payload thread local with cause and message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
cause - the causemessage - the messageargs - the message argumentspublic static Forbidden of(int errorCode)
Returns a static Forbidden instance and set the Result.payload thread local with error code and default message.
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
errorCode - the app defined error codepublic static Forbidden of(int errorCode, String message, Object... args)
Returns a static Forbidden instance and set the Result.payload thread local with error code and message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
errorCode - the app defined error codemessage - the messageargs - the message argumentspublic static Forbidden of(int errorCode, Throwable cause)
Returns a static Forbidden instance and set the Result.payload thread local with error code and cause specified
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
errorCode - the app defined error codepublic static Forbidden of(int errorCode, Throwable cause, String message, Object... args)
Returns a static Forbidden instance and set the Result.payload thread local with error code, cause and message specified.
When calling the instance on Throwable.getMessage() method, it will return whatever stored in the Result.payload thread local
errorCode - the app defined error codemessage - the messageargs - the message arguments@Deprecated public static Forbidden of(Throwable cause, int errorCode)
Returns a static Forbidden instance and set the 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 local
This method is deprecated. Please use of(int, Throwable) instead
cause - the causeerrorCode - the app defined error code@Deprecated public static Forbidden of(Throwable cause, int errorCode, String message, Object... args)
Returns a static Forbidden instance and set the 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 local
This is deprecated. Please use of(int, Throwable, String, Object...) instead
cause - the causeerrorCode - the app defined error codemessage - the messageargs - the message argumentsCopyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.