@Test public void testShouldFilter() { StripPrefixFilter filter = new StripPrefixFilter(Arrays.asList("/path1/.*")); assertThat(filter.shouldFilter(sampleHttpMessage("/path1/testRemaining?query1=val1"))).isTrue(); assertThat(filter.shouldFilter(sampleHttpMessage("/path2/testRemaining?query1=val1"))).isFalse(); }
@Override public boolean shouldFilter(HttpRequestMessage msg) { for (String target: prefixPatterns) { if (msg.getPath().matches(target)) { return true; } } return false; }
StripPrefixFilter extends HttpInboundSyncFilter { @Override public boolean shouldFilter(HttpRequestMessage msg) { for (String target: prefixPatterns) { if (msg.getPath().matches(target)) { return true; } } return false; } }
StripPrefixFilter extends HttpInboundSyncFilter { @Override public boolean shouldFilter(HttpRequestMessage msg) { for (String target: prefixPatterns) { if (msg.getPath().matches(target)) { return true; } } return false; } StripPrefixFilter(List<String> prefixPatterns); }
StripPrefixFilter extends HttpInboundSyncFilter { @Override public boolean shouldFilter(HttpRequestMessage msg) { for (String target: prefixPatterns) { if (msg.getPath().matches(target)) { return true; } } return false; } StripPrefixFilter(List<String> prefixPatterns); @Override HttpRequestMessage apply(HttpRequestMessage input); @Override int filterOrder(); @Override boolean shouldFilter(HttpRequestMessage msg); }
StripPrefixFilter extends HttpInboundSyncFilter { @Override public boolean shouldFilter(HttpRequestMessage msg) { for (String target: prefixPatterns) { if (msg.getPath().matches(target)) { return true; } } return false; } StripPrefixFilter(List<String> prefixPatterns); @Override HttpRequestMessage apply(HttpRequestMessage input); @Override int filterOrder(); @Override boolean shouldFilter(HttpRequestMessage msg);  }