public class Validators extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.apache.kafka.common.config.ConfigDef.Validator |
blankOr(org.apache.kafka.common.config.ConfigDef.Validator validator)
Method will return a validator that will accept a blank string.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
pattern()
Method will return a validator that will ensure that a regular expression properly compiles.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
patternMatches(Pattern pattern)
Method will return a validator that will validate that a string matches a regular expression
|
static org.apache.kafka.common.config.ConfigDef.Validator |
patternMatches(String pattern)
Method will return a validator that will validate that a string matches a regular expression
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validCharset()
Method will return a validator that will ensure that a String or List contains a charset that
is supported by the system.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validCharset(String... charsets)
Method will return a validator that will ensure that a String or List contains a charset that
is supported by the system.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validEnum(Class<? extends Enum> enumClass,
Enum... excludes)
Method is used to create a new INSTANCE of the enum validator.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validHostAndPort()
Validator to ensure that a configuration setting is a hostname and port.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validHostAndPort(Integer defaultPort,
boolean requireBracketsForIPv6,
boolean portRequired)
Validator to ensure that a configuration setting is a hostname and port.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validKeyManagerFactory()
Validator is used to ensure that the KeyManagerFactory Algorithm specified is valid.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validKeyStoreType()
Validator is used to ensure that the KeyStore type specified is valid.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validPort()
Creates a validator in the port range specified.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validPort(int start,
int end)
Creates a validator in the port range specified.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validSSLContext()
Validator is used to ensure that the TrustManagerFactory Algorithm specified is valid.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validTrustManagerFactory()
Validator is used to ensure that the TrustManagerFactory Algorithm specified is valid.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validURI(String... schemes)
Method will return a validator that will ensure that a String or List contains a URI with the
proper syntax.
|
static org.apache.kafka.common.config.ConfigDef.Validator |
validUrl()
Method will return a validator that will ensure that a String or List contains an Url
|
public static org.apache.kafka.common.config.ConfigDef.Validator pattern()
public static org.apache.kafka.common.config.ConfigDef.Validator patternMatches(String pattern)
pattern - Matcher.matches()public static org.apache.kafka.common.config.ConfigDef.Validator patternMatches(Pattern pattern)
pattern - Matcher.matches()public static org.apache.kafka.common.config.ConfigDef.Validator blankOr(org.apache.kafka.common.config.ConfigDef.Validator validator)
validator - Validator to test non blank values with.public static org.apache.kafka.common.config.ConfigDef.Validator validURI(String... schemes)
schemes - The uri schemes that are valid. If empty anything can be accepted.public static org.apache.kafka.common.config.ConfigDef.Validator validUrl()
public static org.apache.kafka.common.config.ConfigDef.Validator validCharset(String... charsets)
charsets - The charsets that are allowed. If empty all of the available charsets on the
system will be included.public static org.apache.kafka.common.config.ConfigDef.Validator validCharset()
public static org.apache.kafka.common.config.ConfigDef.Validator validEnum(Class<? extends Enum> enumClass, Enum... excludes)
enumClass - Enum class with the entries to validate for.excludes - Enum entries to exclude from the validator.public static org.apache.kafka.common.config.ConfigDef.Validator validPort()
public static org.apache.kafka.common.config.ConfigDef.Validator validPort(int start,
int end)
start - The low port of the range.end - The high port of the range.IllegalStateException - Throws if the start not a valid port number.IllegalStateException - Throws if the end not a valid port number.IllegalStateException - Throws if the start is greater than end.public static org.apache.kafka.common.config.ConfigDef.Validator validHostAndPort()
public static org.apache.kafka.common.config.ConfigDef.Validator validHostAndPort(Integer defaultPort, boolean requireBracketsForIPv6, boolean portRequired)
defaultPort - requireBracketsForIPv6 - portRequired - public static org.apache.kafka.common.config.ConfigDef.Validator validKeyStoreType()
public static org.apache.kafka.common.config.ConfigDef.Validator validKeyManagerFactory()
public static org.apache.kafka.common.config.ConfigDef.Validator validTrustManagerFactory()
public static org.apache.kafka.common.config.ConfigDef.Validator validSSLContext()
Copyright © 2016–2025. All rights reserved.