Package org.apache.juneau.http.response
Class PartialContent.Unmodifiable
java.lang.Object
org.apache.juneau.http.response.BasicHttpResponse<PartialContent>
org.apache.juneau.http.response.PartialContent
org.apache.juneau.http.response.PartialContent.Unmodifiable
- All Implemented Interfaces:
HttpResponseMessage,UnmodifiableBean
- Enclosing class:
- PartialContent
Unmodifiable point-in-time snapshot of the enclosing
PartialContent response.
Its only behavioral override is modify(Runnable), which throws — because all mutation is funneled through
modify(...), this single override freezes the entire mutation surface.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juneau.http.response.PartialContent
PartialContent.Unmodifiable -
Field Summary
Fields inherited from class org.apache.juneau.http.response.PartialContent
INSTANCE, REASON_PHRASE, STATUS_CODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PartialContentSingle mutation funnel — the only choke-point through which all state changes on this bean flow.Methods inherited from class org.apache.juneau.http.response.PartialContent
unmodifiableMethods inherited from class org.apache.juneau.http.response.BasicHttpResponse
addHeader, addHeader, equals, freeze, getBody, getHeaders, getLocale, getStatusCode, getStatusLine, hashCode, isUnmodifiable, 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
-
Constructor Details
-
Unmodifiable
Constructor.- Parameters:
copyFrom- The response to snapshot. Must not benull .
-
-
Method Details
-
modify
Description copied from class:BasicHttpResponseSingle mutation funnel — the only choke-point through which all state changes on this bean flow.Every fluent setter routes through this method. The nested
Unmodifiablesnapshot overrides only this method to throw, which freezes the entire mutation surface with a single override.- Overrides:
modifyin classBasicHttpResponse<PartialContent>- Parameters:
mutation- The state change to apply.- Returns:
- This object.
-