public class JettyServletEngineAdapter extends Object implements ServletEngineAdapter
ServletEngineAdapter.Config| Constructor and Description |
|---|
JettyServletEngineAdapter() |
JettyServletEngineAdapter(Optional<WebAppContextFactory> contextFactory,
Optional<com.google.apphosting.utils.config.AppYaml> appYaml) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppVersion(AppVersion appVersion)
Register the specified application version for future calls to
serviceRequest. |
void |
deleteAppVersion(AppVersion appVersion)
Remove the specified application version and free up any
resources associated with it.
|
void |
serviceRequest(com.google.apphosting.base.protos.RuntimePb.UPRequest upRequest,
MutableUpResponse upResponse)
Executes the HTTP request specified by
upRequest and writes the response to upResponse. |
void |
setSessionStoreFactory(SessionStoreFactory factory)
Sets the
SessionStoreFactory that will be used to create
the list of SessionStores to which the HTTP
Session will be stored, if sessions are enabled. |
void |
start(String serverInfo,
ServletEngineAdapter.Config runtimeOptions)
Performs whatever setup is necessary for this servlet container.
|
void |
stop()
Perform any shutdown procedures necessary for this servlet
container.
|
public JettyServletEngineAdapter()
public JettyServletEngineAdapter(Optional<WebAppContextFactory> contextFactory, Optional<com.google.apphosting.utils.config.AppYaml> appYaml)
public void start(String serverInfo, ServletEngineAdapter.Config runtimeOptions)
ServletEngineAdapterstart in interface ServletEngineAdapterserverInfo - The string that should be returned by ServletContext.getServerInfo().runtimeOptions - Extra options, currently used for the Jetty HTTP adapter only.public void stop()
ServletEngineAdapterstop in interface ServletEngineAdapterpublic void addAppVersion(AppVersion appVersion) throws FileNotFoundException
ServletEngineAdapterserviceRequest.addAppVersion in interface ServletEngineAdapterFileNotFoundException - If any of the specified files could
not be located.public void deleteAppVersion(AppVersion appVersion)
ServletEngineAdapterdeleteAppVersion in interface ServletEngineAdapterpublic void setSessionStoreFactory(SessionStoreFactory factory)
SessionStoreFactory that will be used to create
the list of SessionStores to which the HTTP
Session will be stored, if sessions are enabled. This method must be invoked after #start(String).setSessionStoreFactory in interface ServletEngineAdapterpublic void serviceRequest(com.google.apphosting.base.protos.RuntimePb.UPRequest upRequest,
MutableUpResponse upResponse)
throws javax.servlet.ServletException,
IOException
UPRequestHandlerupRequest and writes the response to upResponse.
Finds, and if necessary, instantiates and initializes the appropriate servlet, invokes it,
and copies the response into upResponse.
serviceRequest in interface UPRequestHandlerIOException - If any error related to the request buffer was detected.javax.servlet.ServletExceptionCopyright © 2022. All rights reserved.