Package org.apache.juneau.http.response
Class UseProxy
java.lang.Object
org.apache.juneau.http.response.BasicHttpResponse<UseProxy>
org.apache.juneau.http.response.UseProxy
- All Implemented Interfaces:
HttpResponseMessage
- Direct Known Subclasses:
UseProxy.Unmodifiable
Represents an HTTP 305 Use Proxy response.
The requested resource is available only through a proxy.
See Also:
- Since:
- 9.2.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classUnmodifiable point-in-time snapshot of the enclosingUseProxyresponse. -
Field Summary
Fields -
Constructor Summary
Constructors -
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
-
UseProxy
public UseProxy()Constructor. -
UseProxy
Constructor with a response body.- Parameters:
body- The response body. May benull .
-
UseProxy
Constructor with a plain-text string body.- Parameters:
body- The response body as a plain-text string. May benull .
-
UseProxy
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<UseProxy>- Returns:
- An unmodifiable snapshot of this bean, or this bean if it is already unmodifiable.
-