Class Matchers.HeaderMatcher
java.lang.Object
io.grpc.xds.internal.Matchers.HeaderMatcher
- Direct Known Subclasses:
AutoValue_Matchers_HeaderMatcher
- Enclosing class:
Matchers
Matcher for HTTP request headers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents an integer range. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringcontains()private static Matchers.HeaderMatchercreate(String name, String exactValue, com.google.re2j.Pattern safeRegEx, Matchers.HeaderMatcher.Range range, Boolean present, String prefix, String suffix, String contains, Matchers.StringMatcher stringMatcher, boolean inverted) abstract Stringstatic Matchers.HeaderMatcherforContains(String name, String contains, boolean inverted) The request header value should have this substring.static Matchers.HeaderMatcherforExactValue(String name, String exactValue, boolean inverted) The request header value should exactly match the specified value.static Matchers.HeaderMatcherThe request header value should have this prefix.static Matchers.HeaderMatcherforPresent(String name, boolean present, boolean inverted) The request header value should exist.static Matchers.HeaderMatcherforRange(String name, Matchers.HeaderMatcher.Range range, boolean inverted) The request header value should be within the range.static Matchers.HeaderMatcherforSafeRegEx(String name, com.google.re2j.Pattern safeRegEx, boolean inverted) The request header value should match the regular expression pattern.static Matchers.HeaderMatcherforString(String name, Matchers.StringMatcher stringMatcher, boolean inverted) The request header value should match this stringMatcher.static Matchers.HeaderMatcherThe request header value should have this suffix.abstract booleaninverted()booleanReturns the matching result.abstract Stringname()abstract Stringprefix()abstract Booleanpresent()abstract Matchers.HeaderMatcher.Rangerange()abstract com.google.re2j.Patternabstract Matchers.StringMatcherabstract Stringsuffix()
-
Constructor Details
-
HeaderMatcher
public HeaderMatcher()
-
-
Method Details
-
name
-
exactValue
-
safeRegEx
-
range
-
present
-
prefix
-
suffix
-
contains
-
stringMatcher
-
inverted
public abstract boolean inverted() -
forExactValue
public static Matchers.HeaderMatcher forExactValue(String name, String exactValue, boolean inverted) The request header value should exactly match the specified value. -
forSafeRegEx
public static Matchers.HeaderMatcher forSafeRegEx(String name, com.google.re2j.Pattern safeRegEx, boolean inverted) The request header value should match the regular expression pattern. -
forRange
public static Matchers.HeaderMatcher forRange(String name, Matchers.HeaderMatcher.Range range, boolean inverted) The request header value should be within the range. -
forPresent
The request header value should exist. -
forPrefix
The request header value should have this prefix. -
forSuffix
The request header value should have this suffix. -
forContains
The request header value should have this substring. -
forString
public static Matchers.HeaderMatcher forString(String name, Matchers.StringMatcher stringMatcher, boolean inverted) The request header value should match this stringMatcher. -
create
private static Matchers.HeaderMatcher create(String name, @Nullable String exactValue, @Nullable com.google.re2j.Pattern safeRegEx, @Nullable Matchers.HeaderMatcher.Range range, @Nullable Boolean present, @Nullable String prefix, @Nullable String suffix, @Nullable String contains, @Nullable Matchers.StringMatcher stringMatcher, boolean inverted) -
matches
-