com.google.api.client.extensions.appengine.auth
Class AbstractAppEngineFlowServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.api.client.extensions.servlet.auth.AbstractFlowUserServlet
              extended by com.google.api.client.extensions.appengine.auth.AbstractAppEngineFlowServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class AbstractAppEngineFlowServlet
extends AbstractFlowUserServlet

This class fills in some of the unknowns of the generic AbstractFlowUserServlet with reasonable defaults for App Engine. This servlet requires that the App Engine user must be logged in to work correctly.

Since:
1.4
Author:
moshenko@google.com (Jacob Moshenko)
See Also:
Serialized Form

Constructor Summary
AbstractAppEngineFlowServlet()
           
 
Method Summary
protected  String getUserId()
          Return the user ID of the user that is logged in.
protected  HttpTransport newHttpTransportInstance()
          Create a new HttpTransport instance.
protected  JsonFactory newJsonFactoryInstance()
          Create a new JsonFactory instance.
 
Methods inherited from class com.google.api.client.extensions.servlet.auth.AbstractFlowUserServlet
getCredential, getHttpTransport, getJsonFactory, getPersistenceManagerFactory, newFlow, service
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAppEngineFlowServlet

public AbstractAppEngineFlowServlet()
Method Detail

getUserId

protected String getUserId()
Return the user ID of the user that is logged in.

Specified by:
getUserId in class AbstractFlowUserServlet
Returns:
Get a string representation of a userId that can be used to associate credentials and flows with a specific user.
Throws:
IllegalStateException - Thrown when no user is logged in.

newHttpTransportInstance

protected HttpTransport newHttpTransportInstance()
Description copied from class: AbstractFlowUserServlet
Create a new HttpTransport instance. Implementations can create any type of applicable transport and should be as simple as:
  new NetHttpTransport();
 

Specified by:
newHttpTransportInstance in class AbstractFlowUserServlet
Returns:
HttpTransport instance for your particular environment

newJsonFactoryInstance

protected JsonFactory newJsonFactoryInstance()
Description copied from class: AbstractFlowUserServlet
Create a new JsonFactory instance. Implementations can create any type of applicable json factory and should be as simple as:
  new JacksonFactory();
 

Specified by:
newJsonFactoryInstance in class AbstractFlowUserServlet
Returns:
JsonFactory instance for your particular environment


Copyright © 2011 Google. All Rights Reserved.