public final class ThreadLocalRequestProvider extends Object implements com.google.common.base.Supplier<javax.servlet.http.HttpServletRequest>
| Modifier and Type | Method and Description |
|---|---|
static void |
assignRequest(javax.servlet.http.HttpServletRequest request)
Assign the HttpServletRequest to the ThreadLocal.
|
javax.servlet.http.HttpServletRequest |
get() |
ThreadLocalRequestProvider |
getInstance()
It's a singleton.
|
static void |
removeRequest()
Clear the HttpServletRequest from the ThreadLocal.
|
@Nonnull public javax.servlet.http.HttpServletRequest get()
get in interface com.google.common.base.Supplier<javax.servlet.http.HttpServletRequest>public static void assignRequest(@Nonnull javax.servlet.http.HttpServletRequest request)
removeRequest() at the end of the request, or you'll have a memory leak.public static void removeRequest()
@Nonnull public ThreadLocalRequestProvider getInstance()
Copyright © 2015. All rights reserved.