Class VeniceRouteHandler<T extends ControllerResponse>

java.lang.Object
com.linkedin.venice.controller.server.VeniceRouteHandler<T>
Type Parameters:
T -
All Implemented Interfaces:
spark.Route

public abstract class VeniceRouteHandler<T extends ControllerResponse> extends Object implements spark.Route
Common route handler implement the common part of error handling and writing response to json.
  • Field Details

    • ACL_CHECK_FAILURE_WARN_MESSAGE_PREFIX

      public static final String ACL_CHECK_FAILURE_WARN_MESSAGE_PREFIX
      See Also:
  • Constructor Details

    • VeniceRouteHandler

      public VeniceRouteHandler(Class<T> responseType)
  • Method Details

    • handle

      public Object handle(spark.Request request, spark.Response response) throws Exception
      Specified by:
      handle in interface spark.Route
      Throws:
      Exception
    • checkIsAllowListUser

      protected boolean checkIsAllowListUser(spark.Request request, ControllerResponse veniceResponse, BooleanSupplier isAllowListUser)
    • internalHandle

      public abstract void internalHandle(spark.Request request, T veniceResponse)
      provides a common way to write a handler function for an HTTP request and fill in the HTTP response.
      Parameters:
      request - HTTP request for Venice.
      veniceResponse - Venice constructed response.