Class RestHandler.ReplacedRoute

java.lang.Object
org.opensearch.rest.RestHandler.Route
org.opensearch.rest.RestHandler.ReplacedRoute
Enclosing interface:
RestHandler

@PublicApi(since="1.0.0") public static class RestHandler.ReplacedRoute extends RestHandler.Route
Represents an API that has had its path or method changed. Holds both the new and previous path and method combination.
Opensearch.api:
  • Constructor Details

    • ReplacedRoute

      public ReplacedRoute(RestRequest.Method method, String path, RestRequest.Method deprecatedMethod, String deprecatedPath)
      Construct replaced routes using new and deprocated methods and new and deprecated paths
      Parameters:
      method - route method
      path - new route path
      deprecatedMethod - deprecated method
      deprecatedPath - deprecated path
    • ReplacedRoute

      public ReplacedRoute(RestRequest.Method method, String path, String deprecatedPath)
      Construct replaced routes using route method, new and deprecated paths This constructor can be used when both new and deprecated paths use the same method
      Parameters:
      method - route method
      path - new route path
      deprecatedPath - deprecated path
    • ReplacedRoute

      public ReplacedRoute(RestHandler.Route route, String prefix, String deprecatedPrefix)
      Construct replaced routes using route, new and deprecated prefixes
      Parameters:
      route - route
      prefix - new route prefix
      deprecatedPrefix - deprecated prefix
  • Method Details

    • getDeprecatedPath

      public String getDeprecatedPath()
    • getDeprecatedMethod

      public RestRequest.Method getDeprecatedMethod()