com.google.apphosting.api
Interface ApiProxy.Environment
-
- Enclosing class:
- ApiProxy
public static interface ApiProxy.EnvironmentEnvironment is a simple data container that provides additional information about the current request (e.g. who is logged in, are they an administrator, etc.).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description java.lang.StringgetAppId()Gets the application identifier for the current application.java.util.Map<java.lang.String,java.lang.Object>getAttributes()Get aMapcontaining any attributes that have been set in thisEnvironment.java.lang.StringgetAuthDomain()Returns the domain used for authentication.java.lang.StringgetEmail()Gets the email address of the currently logged-in user.java.lang.StringgetModuleId()Gets the module identifier for the current application instance.longgetRemainingMillis()Gets the remaining number of milliseconds left before this request receives a DeadlineExceededException from App Engine.java.lang.StringgetRequestNamespace()Deprecated.UseNamespaceManager.getGoogleAppsNamespace()java.lang.StringgetVersionId()Gets the version identifier for the current application version.booleanisAdmin()Returns true if the currently logged-in user is an administrator.booleanisLoggedIn()Returns true if the user is logged in.
-
-
-
Method Detail
-
getAppId
java.lang.String getAppId()
Gets the application identifier for the current application.
-
getModuleId
java.lang.String getModuleId()
Gets the module identifier for the current application instance.
-
getVersionId
java.lang.String getVersionId()
Gets the version identifier for the current application version. Result is of the form <major>.<minor> where <major> is the version name supplied at deploy time and <minor> is a timestamp value maintained by App Engine.
-
getEmail
java.lang.String getEmail()
Gets the email address of the currently logged-in user.
-
isLoggedIn
boolean isLoggedIn()
Returns true if the user is logged in.
-
isAdmin
boolean isAdmin()
Returns true if the currently logged-in user is an administrator.
-
getAuthDomain
java.lang.String getAuthDomain()
Returns the domain used for authentication.
-
getRequestNamespace
@Deprecated java.lang.String getRequestNamespace()
Deprecated. UseNamespaceManager.getGoogleAppsNamespace()
-
getAttributes
java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Get aMapcontaining any attributes that have been set in thisEnvironment. The returnedMapis mutable and is a useful place to store transient, per-request information.
-
getRemainingMillis
long getRemainingMillis()
Gets the remaining number of milliseconds left before this request receives a DeadlineExceededException from App Engine. This API can be used for planning how much work you can reasonably accomplish before the soft deadline kicks in. If there is no deadline for the request, then this will reply with Long.MAX_VALUE.
-
-