Class UPRequestTranslator
- java.lang.Object
-
- com.google.apphosting.runtime.jetty94.UPRequestTranslator
-
public class UPRequestTranslator extends Object
Translates HttpServletRequest to the UPRequest proto, and vice versa for the response.
-
-
Constructor Summary
Constructors Constructor Description UPRequestTranslator(AppInfoFactory appInfoFactory, boolean passThroughPrivateHeaders, boolean skipPostData)Construct an UPRequestTranslator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.apphosting.base.protos.RuntimePb.UPRequesttranslateRequest(javax.servlet.http.HttpServletRequest realRequest)Makes a UPRequest from an HttpServletRequestvoidtranslateResponse(org.eclipse.jetty.server.Response response, com.google.apphosting.base.protos.RuntimePb.UPResponse rpcResp)Translate from a response proto to a javax.servlet response.
-
-
-
Constructor Detail
-
UPRequestTranslator
public UPRequestTranslator(AppInfoFactory appInfoFactory, boolean passThroughPrivateHeaders, boolean skipPostData)
Construct an UPRequestTranslator.- Parameters:
appInfoFactory- AnAppInfoFactory.passThroughPrivateHeaders- Include internal App Engine headers in translation (mostly X-AppEngine-*) instead of eliding them.skipPostData- Don't read the request body. This is useful for callers who will read it directly, since the read can only happen once.
-
-
Method Detail
-
translateResponse
public final void translateResponse(org.eclipse.jetty.server.Response response, com.google.apphosting.base.protos.RuntimePb.UPResponse rpcResp)Translate from a response proto to a javax.servlet response.- Parameters:
response- the Jetty response object to fillrpcResp- the proto info available to extract info from
-
translateRequest
public final com.google.apphosting.base.protos.RuntimePb.UPRequest translateRequest(javax.servlet.http.HttpServletRequest realRequest)
Makes a UPRequest from an HttpServletRequest- Parameters:
realRequest- the http request object- Returns:
- equivalent UPRequest object
-
-