Class AWSXRayServletFilter

java.lang.Object
com.amazonaws.xray.javax.servlet.AWSXRayServletFilter
All Implemented Interfaces:
javax.servlet.Filter

public class AWSXRayServletFilter
extends java.lang.Object
implements javax.servlet.Filter
  • Constructor Details

  • Method Details

    • getSegmentOverrideName

      public @Nullable java.lang.String getSegmentOverrideName()
      Returns:
      the segmentOverrideName
    • setSegmentOverrideName

      public void setSegmentOverrideName​(java.lang.String segmentOverrideName)
      Parameters:
      segmentOverrideName - the segmentOverrideName to set
    • getSegmentDefaultName

      public @Nullable java.lang.String getSegmentDefaultName()
      Returns:
      the segmentDefaultName
    • setSegmentDefaultName

      public void setSegmentDefaultName​(java.lang.String segmentDefaultName)
      Parameters:
      segmentDefaultName - the segmentDefaultName to set
    • init

      public void init​(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Parameters:
      config - the filter configuration. There are various init-params which may be passed on initialization. The values in init-params will create segment naming strategies which override those passed in constructors.
      • fixedName A String value used as the fixedName parameter for a created FixedSegmentNamingStrategy. Used only if the dynamicNamingFallbackName init-param is not set.
      • dynamicNamingFallbackName A String value used as the fallbackName parameter for a created DynamicSegmentNamingStrategy.
      • dynamicNamingRecognizedHosts A String value used as the recognizedHosts parameter for a created DynamicSegmentNamingStrategy.
      Throws:
      javax.servlet.ServletException - when a segment naming strategy is not provided in constructor arguments nor in init-params.
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter
    • doFilter

      public void doFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      java.io.IOException
      javax.servlet.ServletException
    • preFilter

      public Segment preFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
    • postFilter

      public void postFilter​(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)