Class ThreadLocalHttpServletRequestSupplier
java.lang.Object
net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletRequestSupplier
- All Implemented Interfaces:
Supplier<javax.servlet.http.HttpServletRequest>,NonnullSupplier<javax.servlet.http.HttpServletRequest>
public class ThreadLocalHttpServletRequestSupplier
extends Object
implements NonnullSupplier<javax.servlet.http.HttpServletRequest>
An implementation of
NonnullSupplier of HttpServletRequests which looks up the current thread-local
servlet request obtained from HttpServletRequestResponseContext.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.http.HttpServletRequestget()Get the current HttpServletRequest from ThreadLocal storage.
-
Constructor Details
-
ThreadLocalHttpServletRequestSupplier
public ThreadLocalHttpServletRequestSupplier()
-
-
Method Details
-
get
@Nonnull public javax.servlet.http.HttpServletRequest get()Get the current HttpServletRequest from ThreadLocal storage.- Specified by:
getin interfaceNonnullSupplier<javax.servlet.http.HttpServletRequest>- Specified by:
getin interfaceSupplier<javax.servlet.http.HttpServletRequest>- Returns:
- the current request
-