Package org.apache.juneau.http.response
Class NotModified
java.lang.Object
org.apache.juneau.http.response.BasicHttpResponse<NotModified>
org.apache.juneau.http.response.NotModified
- All Implemented Interfaces:
HttpResponseMessage
- Direct Known Subclasses:
NotModified.Unmodifiable
Represents an HTTP 304 Not Modified response.
Indicates that the resource has not been modified since the version specified by the request headers.
See Also:
- Since:
- 9.2.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnmodifiable point-in-time snapshot of the enclosingNotModifiedresponse. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NotModifiedDefault unmodifiable instancestatic final StringReason phrasestatic final intHTTP status code -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.NotModified(String body) Constructor with a plain-text string body.NotModified(HttpBody body) Constructor with a response body.NotModified(NotModified copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiable snapshot of this bean.Methods inherited from class org.apache.juneau.http.response.BasicHttpResponse
addHeader, addHeader, equals, freeze, getBody, getHeaders, getLocale, getStatusCode, getStatusLine, hashCode, isUnmodifiable, modify, self, setBody, setContent, setContent, setHeader, setHeader, setHeaders, setHeaders, setLocale, setLocation, setLocation, setProtocolVersion, setReasonPhrase, setStatusCode, setStatusLine, toString, withBody, withBody, withHeader, withHeaderMethods 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:
-
INSTANCE
Default unmodifiable instance
-
-
Constructor Details
-
NotModified
public NotModified()Constructor. -
NotModified
Constructor with a response body.- Parameters:
body- The response body. May benull .
-
NotModified
Constructor with a plain-text string body.- Parameters:
body- The response body as a plain-text string. May benull .
-
NotModified
Copy constructor.- Parameters:
copyFrom- The bean to copy from. Must not benull .
-
-
Method Details
-
unmodifiable
Description copied from class:BasicHttpResponseReturns 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).- Specified by:
unmodifiablein classBasicHttpResponse<NotModified>- Returns:
- An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.
-