Package org.codice.ddf.pax.web.jetty
Class ClientInfoFilter
java.lang.Object
org.codice.ddf.pax.web.jetty.ClientInfoFilter
- All Implemented Interfaces:
org.codice.ddf.platform.filter.http.HttpFilter,org.codice.ddf.platform.filter.SecurityFilter
public class ClientInfoFilter
extends Object
implements org.codice.ddf.platform.filter.http.HttpFilter, org.codice.ddf.platform.filter.SecurityFilter
This servlet filter extracts client-specific information and places it in the shiro
ThreadContext so it can be forwarded to useful areas of interest. Also contains the constants
for working with the client info map.
The information currently all comes from the servlet API; specifically a select few getters
within ServletRequest. The format of the keys follows the format of java beans. The keys
are camel-cased names without the preceeding 'get' found in the method name.
For example, the key associated with ServletRequest.getRemoteAddr() would be the
string remoteAddr.
The only exception to this rule, ThreadContextProperties.CLIENT_INFO_KEY, which holds
a value string of client-info, is the key used to access the entire client information
map. It may contain different kinds of data that does not necessarily correlate to the servlet
API.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.codice.ddf.platform.filter.http.HttpFilterChain filterChain) voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain filterChain) voidinit()
-
Constructor Details
-
ClientInfoFilter
public ClientInfoFilter()
-
-
Method Details
-
doFilter
public void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.codice.ddf.platform.filter.http.HttpFilterChain filterChain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfaceorg.codice.ddf.platform.filter.http.HttpFilter- Throws:
IOExceptionjavax.servlet.ServletException
-
init
public void init()- Specified by:
initin interfaceorg.codice.ddf.platform.filter.SecurityFilter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain filterChain) throws IOException, org.codice.ddf.platform.filter.AuthenticationException - Specified by:
doFilterin interfaceorg.codice.ddf.platform.filter.SecurityFilter- Throws:
IOExceptionorg.codice.ddf.platform.filter.AuthenticationException
-
destroy
public void destroy()- Specified by:
destroyin interfaceorg.codice.ddf.platform.filter.SecurityFilter
-