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, shouldNotFilterErrorDispatch
public static WebUserShell<? extends User,?> getShellForThread()
public void initFilterBean()
initFilterBean
in class org.springframework.web.filter.GenericFilterBean
protected 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.OncePerRequestFilter
javax.servlet.ServletException
IOException
public String getFilterRequestBeanName()
Predicate
filterRequest
,
to put a condition if this Filter should be invoked or not.filterRequest
public void setFilterRequestBeanName(String filterRequestBeanName)
Predicate
filterRequest
,
to put a condition if this Filter should be invoked or not.filterRequest
Copyright © 2018. All rights reserved.