Class UriRouterContext.Builder

java.lang.Object
org.forgerock.http.routing.UriRouterContext.Builder
Enclosing class:
UriRouterContext

public static class UriRouterContext.Builder extends Object
Ease UriRouterContext construction.
  • Method Details

    • matchedUri

      public UriRouterContext.Builder matchedUri(String matchedUri)
      Set the matchedUri value.
      Parameters:
      matchedUri - matched uri
      Returns:
      this builder
    • remainingUri

      public UriRouterContext.Builder remainingUri(String remainingUri)
      Set the remainingUri value.
      Parameters:
      remainingUri - remaining uri
      Returns:
      this builder
    • originalUri

      public UriRouterContext.Builder originalUri(URI originalUri)
      Set the originalUri value (only first UriRouterContext is expected to have that value set).
      Parameters:
      originalUri - original uri
      Returns:
      this builder
    • templateVariables

      public UriRouterContext.Builder templateVariables(Map<String,String> variables)
      Set the variables value.
      Parameters:
      variables - matched variables
      Returns:
      this builder
    • templateVariable

      public UriRouterContext.Builder templateVariable(String name, String value)
      Add the given name:value pair in the variables map.
      Parameters:
      name - matched variable name
      value - matched variable value
      Returns:
      this builder
    • build

      public UriRouterContext build()
      Returns a new UriRouterContext build from provided values.
      Returns:
      a new UriRouterContext.