Package com.google.apphosting.runtime
Class JavaRuntime
java.lang.Object
com.google.apphosting.runtime.JavaRuntime
- All Implemented Interfaces:
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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAppVersion(AnyRpcServerContext rpc, com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) Adds the specified application version so that it can be used for future requests.static JavaRuntime.Builderbuilder()Get a partly-initialized builder.voiddeleteAppVersion(AnyRpcServerContext rpc, com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) Obsolete operation.voidhandleRequest(AnyRpcServerContext rpc, com.google.apphosting.base.protos.RuntimePb.UPRequest upRequest) Translate the specified UPRequest from Prometheus into aHttpServletRequest, invoke the specified servlet, and translate the response back into an UPResponse.static voidvoidstart(ServletEngineAdapter.Config runtimeOptions) Starts the Stubby service, and then perform any initialization that the servlet engine requires.voidstop()Perform a graceful shutdown of our RPC service, and then shut down our servlet engine.
-
Method Details
-
builder
Get a partly-initialized builder. -
start
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 aHttpServletRequest, invoke the specified servlet, and translate the response back into an UPResponse.- Specified by:
handleRequestin interfaceEvaluationRuntimeServerInterface
-
addAppVersion
public void addAppVersion(AnyRpcServerContext rpc, com.google.apphosting.base.protos.AppinfoPb.AppInfo appInfo) Adds the specified application version so that it can be used for future requests.- Specified by:
addAppVersionin interfaceEvaluationRuntimeServerInterface
-
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:
deleteAppVersionin interfaceEvaluationRuntimeServerInterface
-
killCloneIfSeriousException
-