Class RestHandler.Route.RouteBuilder

java.lang.Object
org.elasticsearch.rest.RestHandler.Route.RouteBuilder
Enclosing class:
RestHandler.Route

public static class RestHandler.Route.RouteBuilder
extends java.lang.Object
  • Method Summary

    Modifier and Type Method Description
    RestHandler.Route build()  
    RestHandler.Route.RouteBuilder deprecated​(java.lang.String deprecationMessage, org.elasticsearch.common.RestApiVersion deprecatedInVersion)
    Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.
    RestHandler.Route.RouteBuilder replaces​(RestRequest.Method method, java.lang.String path, org.elasticsearch.common.RestApiVersion replacedInVersion)
    Marks that the route being built replaces another route, and notes the major version in which that replacement occurred.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • deprecated

      public RestHandler.Route.RouteBuilder deprecated​(java.lang.String deprecationMessage, org.elasticsearch.common.RestApiVersion deprecatedInVersion)
      Marks that the route being built has been deprecated (for some reason -- the deprecationMessage), and notes the major version in which that deprecation occurred.

      For example:

       
       Route.builder(GET, "_upgrade")
        .deprecated("The _upgrade API is no longer useful and will be removed.", RestApiVersion.V_7)
        .build()
      Parameters:
      deprecationMessage - the user-visible explanation of this deprecation
      deprecatedInVersion - the major version in which the deprecation occurred
      Returns:
      a reference to this object.
    • replaces

      public RestHandler.Route.RouteBuilder replaces​(RestRequest.Method method, java.lang.String path, org.elasticsearch.common.RestApiVersion replacedInVersion)
      Marks that the route being built replaces another route, and notes the major version in which that replacement occurred.

      For example:

       
       Route.builder(GET, "/_security/user/")
         .replaces(GET, "/_xpack/security/user/", RestApiVersion.V_7).build()
      Parameters:
      method - the method being replaced
      path - the path being replaced
      replacedInVersion - the major version in which the replacement occurred
      Returns:
      a reference to this object.
    • build

      public RestHandler.Route build()