Class TraceContextFilter

java.lang.Object
org.codice.ddf.pax.web.jetty.TraceContextFilter
All Implemented Interfaces:
org.codice.ddf.platform.filter.http.HttpFilter, org.codice.ddf.platform.filter.SecurityFilter

public class TraceContextFilter extends Object implements org.codice.ddf.platform.filter.http.HttpFilter, org.codice.ddf.platform.filter.SecurityFilter
This servlet filter inserts a trace-id into the shiro ThreadContext so it can be forwarded to useful areas of interest.

This filter supports but doesn't full implement the W3C Trace Context specification. Refer to W3C Trace Context Specification and specifically the trace-id property.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.codice.ddf.platform.filter.http.HttpFilterChain filterChain)
     
    void
    doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, org.codice.ddf.platform.filter.SecurityFilterChain filterChain)
     
    void
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TraceContextFilter

      public TraceContextFilter()
  • 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:
      doFilter in interface org.codice.ddf.platform.filter.http.HttpFilter
      Throws:
      IOException
      javax.servlet.ServletException
    • init

      public void init()
      Specified by:
      init in interface org.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:
      doFilter in interface org.codice.ddf.platform.filter.SecurityFilter
      Throws:
      IOException
      org.codice.ddf.platform.filter.AuthenticationException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.codice.ddf.platform.filter.SecurityFilter