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 TypeMethodDescriptionvoid
addAppVersion
(AnyRpcServerContext rpc, AppinfoPb.AppInfo appInfo) Adds the specified application version so that it can be used for future requests.static JavaRuntime.Builder
builder()
Get a partly-initialized builder.void
deleteAppVersion
(AnyRpcServerContext rpc, AppinfoPb.AppInfo appInfo) Obsolete operation.void
handleRequest
(AnyRpcServerContext rpc, RuntimePb.UPRequest upRequest) Translate the specified UPRequest from Prometheus into aHttpServletRequest
, invoke the specified servlet, and translate the response back into an UPResponse.static void
void
start
(ServletEngineAdapter.Config runtimeOptions) Starts the Stubby service, and then perform any initialization that the servlet engine requires.void
stop()
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
Translate the specified UPRequest from Prometheus into aHttpServletRequest
, invoke the specified servlet, and translate the response back into an UPResponse.- Specified by:
handleRequest
in interfaceEvaluationRuntimeServerInterface
-
addAppVersion
Adds the specified application version so that it can be used for future requests.- Specified by:
addAppVersion
in interfaceEvaluationRuntimeServerInterface
-
deleteAppVersion
Obsolete operation. Deleting app versions has always been theoretically possible but never actually implemented in App Engine.- Specified by:
deleteAppVersion
in interfaceEvaluationRuntimeServerInterface
-
killCloneIfSeriousException
-