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 Details

    • ThreadLocalHttpServletRequestSupplier

      public ThreadLocalHttpServletRequestSupplier()
  • Method Details

    • get

      @Nonnull public javax.servlet.http.HttpServletRequest get()
      Get the current HttpServletRequest from ThreadLocal storage.
      Specified by:
      get in interface NonnullSupplier<javax.servlet.http.HttpServletRequest>
      Specified by:
      get in interface Supplier<javax.servlet.http.HttpServletRequest>
      Returns:
      the current request