Class ApiProxyImpl.EnvironmentImpl

java.lang.Object
com.google.apphosting.runtime.ApiProxyImpl.EnvironmentImpl
All Implemented Interfaces:
com.google.apphosting.api.ApiProxy.Environment, com.google.apphosting.api.ApiProxy.EnvironmentWithTrace
Enclosing class:
ApiProxyImpl

public static final class ApiProxyImpl.EnvironmentImpl extends Object implements com.google.apphosting.api.ApiProxy.EnvironmentWithTrace
To implement ApiProxy.Environment, we use a class that wraps around an UPRequest and retrieves the necessary information from it.
  • Method Details

    • addLogRecord

      public void addLogRecord(com.google.apphosting.api.ApiProxy.LogRecord record)
    • flushLogs

      public void flushLogs()
    • getTraceWriter

      public TraceWriter getTraceWriter()
    • getAppId

      public String getAppId()
      Specified by:
      getAppId in interface com.google.apphosting.api.ApiProxy.Environment
    • getModuleId

      public String getModuleId()
      Specified by:
      getModuleId in interface com.google.apphosting.api.ApiProxy.Environment
    • getVersionId

      public String getVersionId()
      Specified by:
      getVersionId in interface com.google.apphosting.api.ApiProxy.Environment
    • getTraceId

      public Optional<String> getTraceId()
      Get the trace id of the current request, which can be used to correlate log messages belonging to that request.
      Specified by:
      getTraceId in interface com.google.apphosting.api.ApiProxy.EnvironmentWithTrace
    • getSpanId

      public Optional<String> getSpanId()
      Get the span id of the current request, which can be used to identify a span within a trace.
      Specified by:
      getSpanId in interface com.google.apphosting.api.ApiProxy.EnvironmentWithTrace
    • getAppVersion

      public AppVersion getAppVersion()
    • isLoggedIn

      public boolean isLoggedIn()
      Specified by:
      isLoggedIn in interface com.google.apphosting.api.ApiProxy.Environment
    • isAdmin

      public boolean isAdmin()
      Specified by:
      isAdmin in interface com.google.apphosting.api.ApiProxy.Environment
    • getEmail

      public String getEmail()
      Specified by:
      getEmail in interface com.google.apphosting.api.ApiProxy.Environment
    • getAuthDomain

      public String getAuthDomain()
      Specified by:
      getAuthDomain in interface com.google.apphosting.api.ApiProxy.Environment
    • getRequestNamespace

      @Deprecated public String getRequestNamespace()
      Deprecated.
      Specified by:
      getRequestNamespace in interface com.google.apphosting.api.ApiProxy.Environment
    • getAttributes

      public Map<String,Object> getAttributes()
      Specified by:
      getAttributes in interface com.google.apphosting.api.ApiProxy.Environment
    • getRemainingMillis

      public long getRemainingMillis()
      Specified by:
      getRemainingMillis in interface com.google.apphosting.api.ApiProxy.Environment
    • getTraceExceptionGenerator