Interface RequestContext


@ProviderType public interface RequestContext
OSGi service interface for getting a sling request for the current thread.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.apache.sling.api.SlingHttpServletRequest
    Returns sling request associated with the current thread.
  • Method Details

    • getThreadRequest

      @Nullable @Nullable org.apache.sling.api.SlingHttpServletRequest getThreadRequest()
      Returns sling request associated with the current thread. The request is stored in a threadlocal set by a servlet filter.
      Returns:
      Sling request or null if none is associated.