/** * Tests whether or not a string matches against a pattern. * @param pattern the pattern to match against (never {@code null}) * @param str the String which must be matched against the pattern (never {@code null}) * @return {@code true} if the string matches against the pattern, or {@code false} otherwise */ private boolean matchStrings(String pattern, String str, Map<String, String> uriTemplateVariables) { return getStringMatcher(pattern).matchStrings(str, uriTemplateVariables); }
@SuppressWarnings("unused") public static ErrorResponseBodySerializer generateErrorContractSerializer( boolean excludeEmptyMetadataFromJson, boolean serializeErrorCodeFieldAsIntegerIfPossible ) { return asErrorResponseBodySerializer( generateErrorContractObjectMapper(excludeEmptyMetadataFromJson, serializeErrorCodeFieldAsIntegerIfPossible) ); }
/** * Convenience function to create a MultiMatcher from a Collection of patterns and collection of HttpMethods. * First match is used so and ordered collection may be needed if a path could match a more general pattern. */ static Matcher multiMatch(Collection<String> matchingPathTemplates, Collection<HttpMethod> matchingMethods) { return MultiMatcher.match(matchingPathTemplates, matchingMethods); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.GET); } }
/** * Convenience function to create a SingleMatcher from a pattern and varargs of HttpMethod */ static Matcher match(String matchingPathTemplate, HttpMethod... matchingMethods) { return SingleMatcher.match(matchingPathTemplate, matchingMethods); }
/** * Check whether the given String has actual text. * More specifically, returns {@code true} if the string not {@code null}, * its length is greater than 0, and it contains at least one non-whitespace character. * @param str the String to check (may be {@code null}) * @return {@code true} if the String is not {@code null}, its length is * greater than 0, and it does not contain whitespace only * @see #hasText(CharSequence) */ public static boolean hasText(String str) { return hasText((CharSequence) str); }
public DecompressingRouterEndpointToDecompressionDisabledBackend(int port) { super( Matcher.match(MATCHING_PATH, HttpMethod.POST), "localhost", port, BasicEndpointWithDecompressionDisabled.MATCHING_PATH, false ); }
/** * Convenience function to create a MultiMatcher from a Collection of patterns and varargs of HttpMethod. * First match is used so and ordered collection may be needed if a path could match a more general pattern. */ static Matcher multiMatch(Collection<String> matchingPathTemplates, HttpMethod... matchingMethods) { return MultiMatcher.match(matchingPathTemplates, matchingMethods); }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.POST); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.GET, HttpMethod.HEAD); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }
public RouterEndpointForwardingToLongerDelayEndpoint(int downstreamPort) { super(Matcher.match(MATCHING_PATH), "127.0.0.1", downstreamPort, LongerDelayEndpoint.MATCHING_PATH, false); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.POST); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.GET); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH, HttpMethod.GET); } }
@Override public Matcher requestMatcher() { return Matcher.match(MATCHING_PATH); } }