Class SpanCustomizingAsyncHandlerInterceptor

java.lang.Object
org.springframework.web.servlet.handler.HandlerInterceptorAdapter
brave.spring.webmvc.SpanCustomizingAsyncHandlerInterceptor
All Implemented Interfaces:
org.springframework.web.servlet.AsyncHandlerInterceptor, org.springframework.web.servlet.HandlerInterceptor

public final class SpanCustomizingAsyncHandlerInterceptor
extends org.springframework.web.servlet.handler.HandlerInterceptorAdapter
Same as SpanCustomizingHandlerInterceptor except it can be used as both an AsyncHandlerInterceptor or a normal HandlerInterceptor.
  • Method Summary

    Modifier and Type Method Description
    void afterCompletion​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, Exception ex)
    Sets the "error" and "http.route" attributes so that the TracingFilter can read them.
    boolean preHandle​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object o)  

    Methods inherited from class org.springframework.web.servlet.handler.HandlerInterceptorAdapter

    afterConcurrentHandlingStarted, postHandle

    Methods inherited from class java.lang.Object

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

    • preHandle

      public boolean preHandle​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object o)
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Overrides:
      preHandle in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter
    • afterCompletion

      public void afterCompletion​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, Exception ex)
      Sets the "error" and "http.route" attributes so that the TracingFilter can read them.
      Specified by:
      afterCompletion in interface org.springframework.web.servlet.HandlerInterceptor
      Overrides:
      afterCompletion in class org.springframework.web.servlet.handler.HandlerInterceptorAdapter