public abstract class HeaderVerification extends Object implements AddsToRuleKey
Modifier and Type | Class and Description |
---|---|
static class |
HeaderVerification.Mode |
Constructor and Description |
---|
HeaderVerification() |
Modifier and Type | Method and Description |
---|---|
abstract HeaderVerification.Mode |
getMode() |
abstract com.google.common.collect.ImmutableSortedSet<String> |
getPlatformWhitelist() |
abstract com.google.common.collect.ImmutableSortedSet<String> |
getWhitelist() |
protected com.google.common.collect.ImmutableList<FasterPattern> |
getWhitelistPatterns() |
boolean |
isWhitelisted(String header) |
static HeaderVerification |
of(HeaderVerification.Mode mode) |
static HeaderVerification |
of(HeaderVerification.Mode mode,
com.google.common.collect.ImmutableSortedSet<String> whitelist,
com.google.common.collect.ImmutableSortedSet<String> platformWhitelist) |
HeaderVerification |
withPlatformWhitelist(Iterable<String> elements) |
public abstract HeaderVerification.Mode getMode()
@Value.NaturalOrder public abstract com.google.common.collect.ImmutableSortedSet<String> getWhitelist()
@Value.NaturalOrder public abstract com.google.common.collect.ImmutableSortedSet<String> getPlatformWhitelist()
@Value.Derived protected com.google.common.collect.ImmutableList<FasterPattern> getWhitelistPatterns()
public static HeaderVerification of(HeaderVerification.Mode mode)
public static HeaderVerification of(HeaderVerification.Mode mode, com.google.common.collect.ImmutableSortedSet<String> whitelist, com.google.common.collect.ImmutableSortedSet<String> platformWhitelist)
public boolean isWhitelisted(String header)
public HeaderVerification withPlatformWhitelist(Iterable<String> elements)