java.lang.Object
com.aoapps.servlet.filter.FunctionContext
- All Implemented Interfaces:
Filter
Provides static access to the current request state via thread local variables.
This should be used for the DispatcherType.REQUEST, DispatcherType.FORWARD, DispatcherType.INCLUDE and DispatcherType.ERROR dispatchers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(ServletRequest request, ServletResponse response, FilterChain chain) static HttpServletRequestGets theHttpServletRequestassociated with the current thread.static HttpServletResponseGets theHttpServletResponseassociated with the current thread.static ServletContextGets theServletContextassociated with the current thread.voidinit(FilterConfig config)
-
Constructor Details
-
FunctionContext
public FunctionContext()
-
-
Method Details
-
getServletContext
Gets theServletContextassociated with the current thread. -
getRequest
Gets theHttpServletRequestassociated with the current thread. -
getResponse
Gets theHttpServletResponseassociated with the current thread. -
init
- Specified by:
initin interfaceFilter- Throws:
ServletException
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException - Specified by:
doFilterin interfaceFilter- Throws:
IOExceptionServletException
-
destroy
public void destroy()
-
