@Test @Ignore public void testFilterOnlyForJavaMelody() throws IOException, ServletException { when(request.getContextPath()).thenReturn(""); when(request.getRequestURI()).thenReturn("/monitoring"); when(filterConfig.getServletContext()).thenReturn(servletContext); filter.init(filterConfig); filter.doFilter(request, response, chain); verifyNoMoreInteractions(chain); }
@Override public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpRequest = (HttpServletRequest) request; if (httpRequest.getRequestURI().equals(getMonitoringUrl(httpRequest))) { super.doFilter(request, response, chain); } else { chain.doFilter(request, response); } }
JavaMelodyFilter extends MonitoringFilter { @Override public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpRequest = (HttpServletRequest) request; if (httpRequest.getRequestURI().equals(getMonitoringUrl(httpRequest))) { super.doFilter(request, response, chain); } else { chain.doFilter(request, response); } } }
JavaMelodyFilter extends MonitoringFilter { @Override public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpRequest = (HttpServletRequest) request; if (httpRequest.getRequestURI().equals(getMonitoringUrl(httpRequest))) { super.doFilter(request, response, chain); } else { chain.doFilter(request, response); } }  }
JavaMelodyFilter extends MonitoringFilter { @Override public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpRequest = (HttpServletRequest) request; if (httpRequest.getRequestURI().equals(getMonitoringUrl(httpRequest))) { super.doFilter(request, response, chain); } else { chain.doFilter(request, response); } }  @Override void doFilter(final ServletRequest request,
            final ServletResponse response, FilterChain chain); }
JavaMelodyFilter extends MonitoringFilter { @Override public void doFilter(final ServletRequest request, final ServletResponse response, FilterChain chain) throws IOException, ServletException { final HttpServletRequest httpRequest = (HttpServletRequest) request; if (httpRequest.getRequestURI().equals(getMonitoringUrl(httpRequest))) { super.doFilter(request, response, chain); } else { chain.doFilter(request, response); } }  @Override void doFilter(final ServletRequest request,
            final ServletResponse response, FilterChain chain);  }