Package org.apache.juneau.rest.beans
Class SeeOtherRoot
java.lang.Object
org.apache.juneau.http.response.BasicHttpResponse
org.apache.juneau.http.response.SeeOther
org.apache.juneau.rest.beans.SeeOtherRoot
- All Implemented Interfaces:
HttpMessage,HttpResponse
@Response
@Schema(description="Redirect to servlet root")
public class SeeOtherRoot
extends SeeOther
Convenience subclass of
SeeOther for redirecting a response to the servlet root.
See Also:
-
Field Summary
FieldsFields inherited from class org.apache.juneau.http.response.SeeOther
REASON_PHRASE, STATUS_CODE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.SeeOtherRoot(String content) Constructor with no redirect.SeeOtherRoot(SeeOtherRoot copyFrom) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a builder for this class initialized with the contents of this bean.setContent(String value) Sets the body on this response.setContent(HttpEntity value) Sets the body on this response.setHeader2(String name, String value) Sets the specified header to the end of the headers in this builder.setHeader2(Header value) Sets the specified header to the end of the headers in this builder.setHeaders(List<Header> values) Sets the specified headers to the end of the headers in this builder.setHeaders(HeaderList value) Sets the specified headers on this response.setHeaders2(Header... values) Sets the specified headers to the end of the headers in this builder.setLocale2(Locale value) Sets the locale used to retrieve reason phrases.setLocation(String value) Specifies the value for theLocation header.setLocation(URI value) Specifies the value for theLocation header.Sets the protocol version on the status line.setReasonPhrase2(String value) Sets the reason phrase on the status line.Sets the reason phrase catalog used to retrieve reason phrases.setStatusCode2(int value) Sets the status code on the status line.setStatusLine(BasicStatusLine value) Sets the protocol version on the status line.Specifies whether this bean should be unmodifiable.Methods inherited from class org.apache.juneau.http.response.BasicHttpResponse
addHeader, addHeader, assertModifiable, assertStatusCode, containsHeader, getAllHeaders, getEntity, getFirstHeader, getHeaders, getHeaders, getLastHeader, getLocale, getParams, getProtocolVersion, getStatusLine, headerIterator, headerIterator, isUnmodifiable, removeHeader, removeHeaders, setEntity, setHeader, setHeader, setHeaders, setLocale, setParams, setReasonPhrase, setStatusCode, setStatusLine, setStatusLine, setStatusLine, toString
-
Field Details
-
INSTANCE
Reusable instance.
-
-
Constructor Details
-
SeeOtherRoot
public SeeOtherRoot()Constructor. -
SeeOtherRoot
Copy constructor.- Parameters:
copyFrom- The object to copy.
-
SeeOtherRoot
Constructor with no redirect.Used for end-to-end interfaces.
- Parameters:
content- Message to send as the response.
-
-
Method Details
-
copy
Description copied from class:SeeOtherCreates a builder for this class initialized with the contents of this bean. -
setContent
Description copied from class:BasicHttpResponseSets the body on this response.- Overrides:
setContentin classSeeOther- Parameters:
value- The body on this response.- Returns:
- This object.
-
setContent
Description copied from class:BasicHttpResponseSets the body on this response.- Overrides:
setContentin classSeeOther- Parameters:
value- The body on this response.- Returns:
- This object.
-
setHeader2
Description copied from class:BasicHttpResponseSets the specified header to the end of the headers in this builder.- Overrides:
setHeader2in classSeeOther- Parameters:
value- The header to add.null values are ignored.- Returns:
- This object.
-
setHeader2
Description copied from class:BasicHttpResponseSets the specified header to the end of the headers in this builder.- Overrides:
setHeader2in classSeeOther- Parameters:
name- The header name.value- The header value.- Returns:
- This object.
-
setHeaders
Description copied from class:BasicHttpResponseSets the specified headers on this response.- Overrides:
setHeadersin classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setHeaders
Description copied from class:BasicHttpResponseSets the specified headers to the end of the headers in this builder.- Overrides:
setHeadersin classSeeOther- Parameters:
values- The headers to add.null values are ignored.- Returns:
- This object.
-
setHeaders2
Description copied from class:BasicHttpResponseSets the specified headers to the end of the headers in this builder.- Overrides:
setHeaders2in classSeeOther- Parameters:
values- The headers to add.null values are ignored.- Returns:
- This object.
-
setLocale2
Description copied from class:BasicHttpResponseSets the locale used to retrieve reason phrases.If not specified, uses
Locale.getDefault().- Overrides:
setLocale2in classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setLocation
Description copied from class:BasicHttpResponseSpecifies the value for theLocation header.- Overrides:
setLocationin classSeeOther- Parameters:
value- The new header location.- Returns:
- This object.
-
setLocation
Description copied from class:BasicHttpResponseSpecifies the value for theLocation header.- Overrides:
setLocationin classSeeOther- Parameters:
value- The new header location.- Returns:
- This object.
-
setProtocolVersion
Description copied from class:BasicHttpResponseSets the protocol version on the status line.If not specified,
"HTTP/1.1" will be used.- Overrides:
setProtocolVersionin classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setReasonPhrase2
Description copied from class:BasicHttpResponseSets the reason phrase on the status line.If not specified, the reason phrase will be retrieved from the reason phrase catalog using the locale on this builder.
- Overrides:
setReasonPhrase2in classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setReasonPhraseCatalog
Description copied from class:BasicHttpResponseSets the reason phrase catalog used to retrieve reason phrases.If not specified, uses
EnglishReasonPhraseCatalog.- Overrides:
setReasonPhraseCatalogin classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setStatusCode2
Description copied from class:BasicHttpResponseSets the status code on the status line.If not specified,
0 will be used.- Overrides:
setStatusCode2in classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setStatusLine
Description copied from class:BasicHttpResponseSets the protocol version on the status line.If not specified,
"HTTP/1.1" will be used.- Overrides:
setStatusLinein classSeeOther- Parameters:
value- The new value.- Returns:
- This object.
-
setUnmodifiable
Description copied from class:BasicHttpResponseSpecifies whether this bean should be unmodifiable.When enabled, attempting to set any properties on this bean will cause an
UnsupportedOperationException.- Overrides:
setUnmodifiablein classSeeOther- Returns:
- This object.
-