Package net.shibboleth.shared.servlet.impl

# Class ThreadLocalHttpServletResponseSupplier

java.lang.Object
net.shibboleth.shared.servlet.impl.ThreadLocalHttpServletResponseSupplier

All Implemented Interfaces:
  `Supplier<HttpServletResponse>`, `NonnullSupplier<HttpServletResponse>`

public class ThreadLocalHttpServletResponseSupplier extends Object implements NonnullSupplier<HttpServletResponse>
An implementation of `NonnullSupplier` which looks up the current thread-local servlet response obtained from `HttpServletRequestResponseContext`, raising an `IllegalStateException` if null.

## Constructor Summary

Constructors
Constructor
Description
`ThreadLocalHttpServletResponseSupplier()`

## Method Summary

Modifier and Type
Method
Description
`HttpServletResponse`
`get()`
Get the current HttpServletResponse from ThreadLocal storage.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ThreadLocalHttpServletResponseSupplier

public ThreadLocalHttpServletResponseSupplier()

## Method Details

### get

@Nonnull public HttpServletResponse get()
Get the current HttpServletResponse from ThreadLocal storage.

Specified by:
  `get` in interface `NonnullSupplier<HttpServletResponse>`
Specified by:
  `get` in interface `Supplier<HttpServletResponse>`
Returns:
  the current response