Class RedirectRule
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.loadbalancer.model.Rule
-
- com.oracle.bmc.loadbalancer.model.RedirectRule
-
@Generated(value="OracleSDKGenerator", comments="API Version: 20170115") public final class RedirectRule extends Rule
An object that represents the action of returning a specified response code and a redirect URI.Each RedirectRule object is configured for a particular listener and a designated path.
The default response code is 302 Found.
*NOTES:** * This rule applies only to HTTP listeners. * You can specify this rule only with the
ruleCondition
type PATH. * A listener can have only one RedirectRule object for a given original path. ThepathMatchCondition
attributeValue specifies the original path.
Note: Objects should always be created or deserialized using theRedirectRule.Builder
. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of theRedirectRule.Builder
, which maintain a set of all explicitly set fields calledRedirectRule.Builder.__explicitlySet__
. ThehashCode()
andequals(Object)
methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RedirectRule.Builder
-
Nested classes/interfaces inherited from class com.oracle.bmc.loadbalancer.model.Rule
Rule.Action
-
-
Constructor Summary
Constructors Constructor Description RedirectRule(Integer responseCode, List<RuleCondition> conditions, RedirectUri redirectUri)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RedirectRule.Builder
builder()
Create a new builder.boolean
equals(Object o)
List<RuleCondition>
getConditions()
RedirectUri
getRedirectUri()
Integer
getResponseCode()
The HTTP status code to return when the incoming request is redirected.int
hashCode()
RedirectRule.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
RedirectRule
@Deprecated public RedirectRule(Integer responseCode, List<RuleCondition> conditions, RedirectUri redirectUri)
Deprecated.
-
-
Method Detail
-
builder
public static RedirectRule.Builder builder()
Create a new builder.
-
toBuilder
public RedirectRule.Builder toBuilder()
-
getResponseCode
public Integer getResponseCode()
The HTTP status code to return when the incoming request is redirected.The status line returned with the code is mapped from the standard HTTP specification. Valid response codes for redirection are:
301 * 302 * 303 * 307 * 308
The default value is 302 (Found).
Example: 301
- Returns:
- the value
-
getConditions
public List<RuleCondition> getConditions()
-
getRedirectUri
public RedirectUri getRedirectUri()
-
toString
public String toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-