RedirectConfiguration Class

public final class RedirectConfiguration
extends RouteConfiguration

Describes Redirect Route.

Constructor Summary

Constructor Description
RedirectConfiguration()

Creates an instance of RedirectConfiguration class.

Method Summary

Modifier and Type Method and Description
String customFragment()

Get the customFragment property: Fragment to add to the redirect URL.

String customHost()

Get the customHost property: Host to redirect.

String customPath()

Get the customPath property: The full path to redirect.

String customQueryString()

Get the customQueryString property: The set of query strings to be placed in the redirect URL.

FrontDoorRedirectProtocol redirectProtocol()

Get the redirectProtocol property: The protocol of the destination to where the traffic is redirected.

FrontDoorRedirectType redirectType()

Get the redirectType property: The redirect type the rule will use when redirecting traffic.

void validate()

Validates the instance.

RedirectConfiguration withCustomFragment(String customFragment)

Set the customFragment property: Fragment to add to the redirect URL.

RedirectConfiguration withCustomHost(String customHost)

Set the customHost property: Host to redirect.

RedirectConfiguration withCustomPath(String customPath)

Set the customPath property: The full path to redirect.

RedirectConfiguration withCustomQueryString(String customQueryString)

Set the customQueryString property: The set of query strings to be placed in the redirect URL.

RedirectConfiguration withRedirectProtocol(FrontDoorRedirectProtocol redirectProtocol)

Set the redirectProtocol property: The protocol of the destination to where the traffic is redirected.

RedirectConfiguration withRedirectType(FrontDoorRedirectType redirectType)

Set the redirectType property: The redirect type the rule will use when redirecting traffic.

Methods inherited from RouteConfiguration

Methods inherited from java.lang.Object

Constructor Details

RedirectConfiguration

public RedirectConfiguration()

Creates an instance of RedirectConfiguration class.

Method Details

customFragment

public String customFragment()

Get the customFragment property: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.

Returns:

the customFragment value.

customHost

public String customHost()

Get the customHost property: Host to redirect. Leave empty to use the incoming host as the destination host.

Returns:

the customHost value.

customPath

public String customPath()

Get the customPath property: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.

Returns:

the customPath value.

customQueryString

public String customQueryString()

Get the customQueryString property: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &.

Returns:

the customQueryString value.

redirectProtocol

public FrontDoorRedirectProtocol redirectProtocol()

Get the redirectProtocol property: The protocol of the destination to where the traffic is redirected.

Returns:

the redirectProtocol value.

redirectType

public FrontDoorRedirectType redirectType()

Get the redirectType property: The redirect type the rule will use when redirecting traffic.

Returns:

the redirectType value.

validate

public void validate()

Validates the instance.

Overrides:

RedirectConfiguration.validate()

withCustomFragment

public RedirectConfiguration withCustomFragment(String customFragment)

Set the customFragment property: Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #.

Parameters:

customFragment - the customFragment value to set.

Returns:

the RedirectConfiguration object itself.

withCustomHost

public RedirectConfiguration withCustomHost(String customHost)

Set the customHost property: Host to redirect. Leave empty to use the incoming host as the destination host.

Parameters:

customHost - the customHost value to set.

Returns:

the RedirectConfiguration object itself.

withCustomPath

public RedirectConfiguration withCustomPath(String customPath)

Set the customPath property: The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path.

Parameters:

customPath - the customPath value to set.

Returns:

the RedirectConfiguration object itself.

withCustomQueryString

public RedirectConfiguration withCustomQueryString(String customQueryString)

Set the customQueryString property: The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in = format. The first ? and & will be added automatically so do not include them in the front, but do separate multiple query strings with &.

Parameters:

customQueryString - the customQueryString value to set.

Returns:

the RedirectConfiguration object itself.

withRedirectProtocol

public RedirectConfiguration withRedirectProtocol(FrontDoorRedirectProtocol redirectProtocol)

Set the redirectProtocol property: The protocol of the destination to where the traffic is redirected.

Parameters:

redirectProtocol - the redirectProtocol value to set.

Returns:

the RedirectConfiguration object itself.

withRedirectType

public RedirectConfiguration withRedirectType(FrontDoorRedirectType redirectType)

Set the redirectType property: The redirect type the rule will use when redirecting traffic.

Parameters:

redirectType - the redirectType value to set.

Returns:

the RedirectConfiguration object itself.

Applies to