public static final class RedirectOptions.Builder
extends java.lang.Object
RedirectOptions
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RedirectOptions |
build()
Builds the configured instance.
|
RedirectOptions.Builder |
host(java.lang.String host)
Sets the value of
RedirectOptions.getHost() |
RedirectOptions.Builder |
path(java.lang.String path)
Sets the value of
RedirectOptions.getPath() |
RedirectOptions.Builder |
permanent(java.lang.Boolean permanent)
Sets the value of
RedirectOptions.getPermanent() |
RedirectOptions.Builder |
port(java.lang.String port)
Sets the value of
RedirectOptions.getPort() |
RedirectOptions.Builder |
protocol(java.lang.String protocol)
Sets the value of
RedirectOptions.getProtocol() |
RedirectOptions.Builder |
query(java.lang.String query)
Sets the value of
RedirectOptions.getQuery() |
public RedirectOptions.Builder host(java.lang.String host)
RedirectOptions.getHost()
host
- The hostname.
This component is not percent-encoded. The hostname can contain #{host}.this
public RedirectOptions.Builder path(java.lang.String path)
RedirectOptions.getPath()
path
- The absolute path, starting with the leading "/".
This component is not percent-encoded. The path can contain #{host}, #{path}, and #{port}.this
public RedirectOptions.Builder permanent(java.lang.Boolean permanent)
RedirectOptions.getPermanent()
permanent
- The HTTP redirect code.
The redirect is either permanent (HTTP 301) or temporary (HTTP 302).this
public RedirectOptions.Builder port(java.lang.String port)
RedirectOptions.getPort()
port
- The port.
You can specify a value from 1 to 65535 or #{port}.this
public RedirectOptions.Builder protocol(java.lang.String protocol)
RedirectOptions.getProtocol()
protocol
- The protocol.
You can specify HTTP, HTTPS, or #{protocol}. You can redirect HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS to HTTP.this
public RedirectOptions.Builder query(java.lang.String query)
RedirectOptions.getQuery()
query
- The query parameters, URL-encoded when necessary, but not percent-encoded.
Do not include the leading "?", as it is automatically added. You can specify any of the reserved keywords.this
public RedirectOptions build()
RedirectOptions
java.lang.NullPointerException
- if any required attribute was not provided