Class RequestManager

java.lang.Object
com.google.apphosting.runtime.RequestManager
All Implemented Interfaces:
RequestThreadManager

public class RequestManager extends Object implements RequestThreadManager
RequestManager is responsible for setting up and tearing down any state associated with each request.

At the moment, this includes:

  • Injecting an Environment implementation for the request's thread into ApiProxy.
  • Scheduling any future actions that must occur while the request is executing (e.g. deadline exceptions), and cleaning up any scheduled actions that do not occur.
It is expected that clients will use it like this:
 RequestManager.RequestToken token =
     requestManager.startRequest(...);
 try {
   ...
 } finally {
   requestManager.finishRequest(token);
 }