Class JavaRuntime

  • All Implemented Interfaces:
    EvaluationRuntimeServerInterface

    public class JavaRuntime
    extends Object
    implements EvaluationRuntimeServerInterface
    JavaRuntime implements the Prometheus EvaluationRuntime service. It handles any requests for the "java" runtime. At the moment, this only includes requests whose handler type is SERVLET. The handler path is assumed to be the full class name of a class that extends GenericServlet.

    JavaRuntime is not responsible for configuring ApiProxy with a delegate. This class should probably be instantiated by JavaRuntimeFactory, which also sets up ApiProxy.

    • Method Detail

      • start

        public void start​(ServletEngineAdapter.Config runtimeOptions)
        Starts the Stubby service, and then perform any initialization that the servlet engine requires.
      • stop

        public void stop()
        Perform a graceful shutdown of our RPC service, and then shut down our servlet engine.
      • handleRequest

        public void handleRequest​(AnyRpcServerContext rpc,
                                  com.google.apphosting.base.protos.RuntimePb.UPRequest upRequest)
        Translate the specified UPRequest from Prometheus into a HttpServletRequest, invoke the specified servlet, and translate the response back into an UPResponse.
        Specified by:
        handleRequest in interface EvaluationRuntimeServerInterface
      • deleteAppVersion

        public void deleteAppVersion​(AnyRpcServerContext rpc,
                                     com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo)
        Obsolete operation. Deleting app versions has always been theoretically possible but never actually implemented in App Engine.
        Specified by:
        deleteAppVersion in interface EvaluationRuntimeServerInterface
      • killCloneIfSeriousException

        public static void killCloneIfSeriousException​(Throwable th)