public class UserShellToThreadLocalFilter<U extends User>
extends org.springframework.web.filter.OncePerRequestFilter
Session based WebUserShell and attach it to a ThreadLocal, for code that may not have access to the Request or Session
directly. Access it via getShellForThread().| Constructor and Description |
|---|
UserShellToThreadLocalFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain) |
String |
getFilterRequestBeanName()
Bean name of the Spring instantiated
Predicate filterRequest,
to put a condition if this Filter should be invoked or not. |
static WebUserShell<? extends User,?> |
getShellForThread() |
void |
initFilterBean() |
void |
setFilterRequestBeanName(String filterRequestBeanName)
Bean name of the Spring instantiated
Predicate filterRequest,
to put a condition if this Filter should be invoked or not. |
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchpublic static WebUserShell<? extends User,?> getShellForThread()
public void initFilterBean()
initFilterBean in class org.springframework.web.filter.GenericFilterBeanprotected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws javax.servlet.ServletException,
IOException
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilterjavax.servlet.ServletExceptionIOExceptionpublic String getFilterRequestBeanName()
Predicate filterRequest,
to put a condition if this Filter should be invoked or not.filterRequestpublic void setFilterRequestBeanName(String filterRequestBeanName)
Predicate filterRequest,
to put a condition if this Filter should be invoked or not.filterRequestCopyright © 2018. All rights reserved.