Interface RoutingRule.Builder

    • Method Detail

      • condition

        RoutingRule.Builder condition​(Condition condition)

        A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

        Parameters:
        condition - A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • condition

        default RoutingRule.Builder condition​(Consumer<Condition.Builder> condition)

        A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the /docs folder, redirect to the /documents folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.

        This is a convenience method that creates an instance of the Condition.Builder avoiding the need to create one manually via Condition.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to condition(Condition).

        Parameters:
        condition - a consumer that will call methods on Condition.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        condition(Condition)
      • redirect

        RoutingRule.Builder redirect​(Redirect redirect)

        Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.

        Parameters:
        redirect - Container for redirect information. You can redirect requests to another host, to another page, or with another protocol. In the event of an error, you can specify a different error code to return.
        Returns:
        Returns a reference to this object so that method calls can be chained together.