Class ThreadLocalHttpServletResponseSupplier

java.lang.Object
net.shibboleth.utilities.java.support.net.ThreadLocalHttpServletResponseSupplier
All Implemented Interfaces:
Supplier<javax.servlet.http.HttpServletResponse>, NonnullSupplier<javax.servlet.http.HttpServletResponse>

public class ThreadLocalHttpServletResponseSupplier extends Object implements NonnullSupplier<javax.servlet.http.HttpServletResponse>
An implementation of NonnullSupplier of HttpServletResponses which looks up the current thread-local servlet response obtained from HttpServletRequestResponseContext.
  • Constructor Details

    • ThreadLocalHttpServletResponseSupplier

      public ThreadLocalHttpServletResponseSupplier()
  • Method Details

    • get

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