Package org.apache.juneau.http.response
Class ExpectationFailed
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.juneau.http.response.BasicHttpException
org.apache.juneau.http.response.ExpectationFailed
- All Implemented Interfaces:
Serializable,HttpResponseMessage
- Direct Known Subclasses:
ExpectationFailed.Unmodifiable
Represents an HTTP 417 Expectation Failed error response.
The server cannot meet the requirements of the Expect request-header field.
See Also:
- Since:
- 9.2.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnmodifiable point-in-time snapshot of the enclosingExpectationFailedexception. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringReason phrasestatic final intHTTP status code -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with no message.ExpectationFailed(String msg, Object... args) Constructor with aString.format-style message.ExpectationFailed(Throwable cause) Constructor with a cause.ExpectationFailed(Throwable cause, String msg, Object... args) Constructor with a cause and aString.format-style message.ExpectationFailed(ExpectationFailed 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
-
ExpectationFailed
public ExpectationFailed()Constructor with no message. -
ExpectationFailed
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.
-
ExpectationFailed
Constructor with a cause.- Parameters:
cause- The cause. May benull .
-
ExpectationFailed
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.
-
ExpectationFailed
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.
-