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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
void
doFilter
(ServletRequest request, ServletResponse response, FilterChain chain) static HttpServletRequest
Gets theHttpServletRequest
associated with the current thread.static HttpServletResponse
Gets theHttpServletResponse
associated with the current thread.static ServletContext
Gets theServletContext
associated with the current thread.void
init
(FilterConfig config)
-
Constructor Details
-
FunctionContext
public FunctionContext()
-
-
Method Details
-
getServletContext
Gets theServletContext
associated with the current thread. -
getRequest
Gets theHttpServletRequest
associated with the current thread. -
getResponse
Gets theHttpServletResponse
associated with the current thread. -
init
- Specified by:
init
in interfaceFilter
- Throws:
ServletException
-
doFilter
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException - Specified by:
doFilter
in interfaceFilter
- Throws:
IOException
ServletException
-
destroy
public void destroy()
-