Package org.apache.juneau.http.response
Class PreconditionFailed
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.http.response.BasicHttpException
org.apache.juneau.http.response.PreconditionFailed
- All Implemented Interfaces:
Serializable,HttpResponseMessage
- Direct Known Subclasses:
PreconditionFailed.Unmodifiable
Represents an HTTP 412 Precondition Failed error response.
The server does not meet one of the preconditions that the requester put on the request.
See Also:
- Since:
- 9.2.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnmodifiable point-in-time snapshot of the enclosingPreconditionFailedexception. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReason phrasestatic final intHTTP status code -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with no message.PreconditionFailed(String msg, Object... args) Constructor with aString.format-style message.PreconditionFailed(Throwable cause) Constructor with a cause.PreconditionFailed(Throwable cause, String msg, Object... args) Constructor with a cause and aString.format-style message.PreconditionFailed(PreconditionFailed copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable snapshot of this bean.Methods inherited from class org.apache.juneau.http.response.BasicHttpException
addHeader, addHeader, equals, freeze, getBody, getFullStackMessage, getHeaders, getLocale, getMessage, getRootCause, getStatusCode, getStatusLine, hashCode, isUnmodifiable, modify, setBody, setContent, setContent, setHeader, setHeader, setHeaders, setHeaders, setLocale, setProtocolVersion, setReasonPhrase, setStatusCode, setStatusLine, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.juneau.http.response.HttpResponseMessage
getFirstHeader, getHeaders
-
Field Details
-
STATUS_CODE
HTTP status code- See Also:
-
REASON_PHRASE
Reason phrase- See Also:
-
-
Constructor Details
-
PreconditionFailed
public PreconditionFailed()Constructor with no message. -
PreconditionFailed
Constructor with aString.format-style message.- Parameters:
msg- The detail message. May benull . Treated as aString.format-style format string (%s placeholders) whenargsis non-empty.args- Optional message arguments.
-
PreconditionFailed
Constructor with a cause.- Parameters:
cause- The cause. May benull .
-
PreconditionFailed
Constructor with a cause and aString.format-style message.- Parameters:
cause- The cause. May benull .msg- The detail message. May benull . Treated as aString.format-style format string (%s placeholders) whenargsis non-empty.args- Optional message arguments.
-
PreconditionFailed
Copy constructor.- Parameters:
copyFrom- The instance to copy. Must not benull .
-
-
Method Details
-
unmodifiable
Description copied from class:BasicHttpExceptionReturns an unmodifiable snapshot of this bean.The returned instance is a point-in-time copy of the leaf's nested
Unmodifiabletype; any attempt to set a property on it throws anUnsupportedOperationException. This method is idempotent: if this bean is already unmodifiable it returns itself rather than taking another snapshot. The receiver is left unchanged (and still modifiable unless it was already unmodifiable).- Overrides:
unmodifiablein classBasicHttpException- Returns:
- An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.
-