public class UnavailableForLegalReasons extends ErrorResult
A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
Result.Payload| Constructor and Description |
|---|
UnavailableForLegalReasons() |
UnavailableForLegalReasons(int errorCode) |
UnavailableForLegalReasons(int errorCode,
String message,
Object... args) |
UnavailableForLegalReasons(int errorCode,
Throwable cause) |
UnavailableForLegalReasons(int errorCode,
Throwable cause,
String message,
Object... args) |
UnavailableForLegalReasons(String message,
Object... args) |
UnavailableForLegalReasons(Throwable cause) |
UnavailableForLegalReasons(Throwable cause,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
static UnavailableForLegalReasons |
get()
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with default message. |
static UnavailableForLegalReasons |
of(int errorCode)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with error code and default message. |
static UnavailableForLegalReasons |
of(int errorCode,
String message,
Object... args)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with error code and message specified. |
static UnavailableForLegalReasons |
of(int errorCode,
Throwable cause)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with error code and cause specified |
static UnavailableForLegalReasons |
of(int errorCode,
Throwable cause,
String message,
Object... args)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with error code, cause and message specified. |
static UnavailableForLegalReasons |
of(String message,
Object... args)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with message specified. |
static UnavailableForLegalReasons |
of(Throwable cause)
Returns a static UnavailableForLegalReasons instance and set the
Result.payload thread local with cause specified. |
static UnavailableForLegalReasons |
of(Throwable cause,
String message,
Object... args)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons()
public UnavailableForLegalReasons(Throwable cause, String message, Object... args)
public UnavailableForLegalReasons(Throwable cause)
public UnavailableForLegalReasons(int errorCode)
public UnavailableForLegalReasons(int errorCode,
String message,
Object... args)
public UnavailableForLegalReasons(int errorCode,
Throwable cause,
String message,
Object... args)
public UnavailableForLegalReasons(int errorCode,
Throwable cause)
public static UnavailableForLegalReasons get()
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(String message, Object... args)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(Throwable cause)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(Throwable cause, String message, Object... args)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(int errorCode)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(int errorCode, String message, Object... args)
Returns a static UnavailableForLegalReasons 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 UnavailableForLegalReasons of(int errorCode, Throwable cause)
Returns a static UnavailableForLegalReasons 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
cause - the causeerrorCode - the app defined error codepublic static UnavailableForLegalReasons of(int errorCode, Throwable cause, String message, Object... args)
Returns a static UnavailableForLegalReasons 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
cause - the causeerrorCode - the app defined error codemessage - the messageargs - the message argumentsCopyright © 2014–2018 OSGL (Open Source General Library). All rights reserved.