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

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

public abstract class AbstractAppEngineTwoLeggedFlowServlet
extends AbstractTwoLeggedFlowServlet

Specialization of the two-legged flow that uses some simple defaults for App Engine.

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

Constructor Summary
AbstractAppEngineTwoLeggedFlowServlet()
           
 
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.AbstractTwoLeggedFlowServlet
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

AbstractAppEngineTwoLeggedFlowServlet

public AbstractAppEngineTwoLeggedFlowServlet()
Method Detail

getUserId

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

Specified by:
getUserId in class AbstractTwoLeggedFlowServlet
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: AbstractTwoLeggedFlowServlet
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 AbstractTwoLeggedFlowServlet
Returns:
HttpTransport instance for your particular environment

newJsonFactoryInstance

protected JsonFactory newJsonFactoryInstance()
Description copied from class: AbstractTwoLeggedFlowServlet
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 AbstractTwoLeggedFlowServlet
Returns:
JsonFactory instance for your particular environment


Copyright © 2011 Google. All Rights Reserved.