Package io.wcm.sling.commons.request
Interface RequestContext
@ProviderType
public interface RequestContext
OSGi service interface for getting a sling request for the current thread.
-
Method Summary
Modifier and TypeMethodDescription@Nullable org.apache.sling.api.SlingHttpServletRequestReturns 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.
-