public class RequestTimeout extends ErrorResult
The server timed out waiting for the request. According to HTTP specifications: “The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.”
Result.Payload| Constructor and Description |
|---|
RequestTimeout() |
RequestTimeout(int errorCode) |
RequestTimeout(int errorCode,
String message,
Object... args) |
RequestTimeout(int errorCode,
Throwable cause) |
RequestTimeout(int errorCode,
Throwable cause,
String message,
Object... args) |
RequestTimeout(String message,
Object... args) |
RequestTimeout(Throwable cause) |
RequestTimeout(Throwable cause,
String message,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
static RequestTimeout |
get()
Returns a static RequestTimeout instance and set the
Result.payload thread local with default message. |
static RequestTimeout |
of(int errorCode)
Returns a static RequestTimeout instance and set the
Result.payload thread local with error code and default message. |
static RequestTimeout |
of(int errorCode,
String message,
Object... args)
Returns a static RequestTimeout instance and set the
Result.payload thread local with error code and message specified. |
static RequestTimeout |
of(int errorCode,
Throwable cause)
Returns a static RequestTimeout instance and set the
Result.payload thread local with error code and cause specified |
static RequestTimeout |
of(int errorCode,
Throwable cause,
String message,
Object... args)
Returns a static RequestTimeout instance and set the
Result.payload thread local with error code, cause and message specified. |
static RequestTimeout |
of(String message,
Object... args)
Returns a static RequestTimeout instance and set the
Result.payload thread local with message specified. |
static RequestTimeout |
of(Throwable cause)
Returns a static RequestTimeout instance and set the
Result.payload thread local with cause specified. |
static RequestTimeout |
of(Throwable cause,
String message,
Object... args)
Returns a static RequestTimeout 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 RequestTimeout()
public RequestTimeout(Throwable cause)
public RequestTimeout(int errorCode)
public RequestTimeout(int errorCode,
Throwable cause,
String message,
Object... args)
public RequestTimeout(int errorCode,
Throwable cause)
public static RequestTimeout get()
Returns a static RequestTimeout 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 RequestTimeout of(String message, Object... args)
Returns a static RequestTimeout 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 RequestTimeout of(Throwable cause)
Returns a static RequestTimeout 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 RequestTimeout of(Throwable cause, String message, Object... args)
Returns a static RequestTimeout 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 RequestTimeout of(int errorCode)
Returns a static RequestTimeout 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 RequestTimeout of(int errorCode, String message, Object... args)
Returns a static RequestTimeout 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 RequestTimeout of(int errorCode, Throwable cause)
Returns a static RequestTimeout 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 RequestTimeout of(int errorCode, Throwable cause, String message, Object... args)
Returns a static RequestTimeout 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.