Class ApiServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.appengine.tools.development.ApiServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class ApiServlet
extends javax.servlet.http.HttpServlet
Servlet handling POST requests to serve App Engine Standard API calls implemented by the API stub
implementations used by the dev app server. This can be used in a local dev environment to
emulate App Engine APIs, or in a test environment. The protocol buffer used is the same as the
App Engine remote APIs documented at
https://cloud.google.com/appengine/docs/standard/java/tools/remoteapi and the one used from the
Java clones in production to make API calls.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class javax.servlet.http.HttpServlet
serviceMethods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
ApiServlet
public ApiServlet()
-
-
Method Details
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException Configure the APIServlet with 2 servlet init paramerters:java_runtime_port: the local port of the java clone. This is needed for the taskqueue APIs to be able to post callback to the clone. java_runtime_host: the hostname of the java clone. (default to localhost). * executor_pool_size: size of the threadpool handling API calls. Default is 10.- Specified by:
initin interfacejavax.servlet.Servlet- Overrides:
initin classjavax.servlet.GenericServlet- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.servlet.Servlet- Overrides:
destroyin classjavax.servlet.GenericServlet
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException - Throws:
IOException
-