Interface AppContext


public interface AppContext
A container-agnostic interface to the currently loaded webapp.
  • Method Details

    • getClassLoader

      ClassLoader getClassLoader()
      Returns the ClassLoader for the webapp.
      Returns:
      a non-null ClassLoader
    • getUserPermissions

      Permissions getUserPermissions()
      Returns a Permissions object containing UnresolvedPermission instances for every permission that was requested by the user in their appengine-web.xml file.

      Note that user code will not actually run with these permissions. However, to user-provided code that calls SecurityManager.checkPermission directly it will appear that it is. This is designed primarily for third-party libraries that introduce their own Permission subclasses that are not used by any other classes.

      Returns:
      a non-null set of Permissions
    • getApplicationPermissions

      Permissions getApplicationPermissions()
      Returns the set of Permissions granted to the application, excluding user-specified permissions.
      Returns:
      a non-null set of Permissions
    • getContainerContext

      Object getContainerContext()
      Returns the container-specific context implementation.
      Returns:
      a non-null context, represented by a container-specific class. For example, Jetty's org.mortbay.jetty.webapp.WebAppContext.