@InterfaceStability.Evolving public enum PatternType extends Enum<PatternType>
Enum Constant and Description |
---|
ANY
In a filter, matches any resource pattern type.
|
CONFLUENT_ALL_TENANT_ANY
Match all ACLs of tenant.
|
CONFLUENT_ALL_TENANT_LITERAL
Match all LITERAL ACLs of tenant.
|
CONFLUENT_ALL_TENANT_PREFIXED
Match all PREFIXED ACLs of tenant.
|
CONFLUENT_ONLY_TENANT_MATCH
MATCH with the same semantics as non-tenant MATCH, but this only matches tenant-prefixed resources.
|
LITERAL
A literal resource name.
|
MATCH
In a filter, will perform pattern matching.
|
PREFIXED
A prefixed resource name.
|
UNKNOWN
Represents any PatternType which this client cannot understand, perhaps because this client is too old.
|
Modifier and Type | Method and Description |
---|---|
byte |
code() |
static PatternType |
fromCode(byte code)
Return the PatternType with the provided code or
UNKNOWN if one cannot be found. |
static PatternType |
fromString(String name)
Return the PatternType with the provided name or
UNKNOWN if one cannot be found. |
boolean |
isSpecific() |
boolean |
isTenantPrefixed() |
boolean |
isUnknown() |
static PatternType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PatternType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PatternType UNKNOWN
public static final PatternType ANY
public static final PatternType MATCH
ResourcePatternFilter(TOPIC, "payments.received", MATCH)`
, the filter match
any ResourcePattern
that matches topic 'payments.received'. This might include:
ResourcePattern(TOPIC, "payments.received", LITERAL)
ResourcePattern(TOPIC, "*", LITERAL)
ResourcePattern(TOPIC, "payments.", PREFIXED)
public static final PatternType LITERAL
*
can be used to represent a resource with any name.public static final PatternType PREFIXED
public static final PatternType CONFLUENT_ALL_TENANT_LITERAL
public static final PatternType CONFLUENT_ALL_TENANT_PREFIXED
public static final PatternType CONFLUENT_ALL_TENANT_ANY
public static final PatternType CONFLUENT_ONLY_TENANT_MATCH
public static PatternType[] values()
for (PatternType c : PatternType.values()) System.out.println(c);
public static PatternType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic byte code()
public boolean isUnknown()
public boolean isSpecific()
public boolean isTenantPrefixed()
public static PatternType fromCode(byte code)
UNKNOWN
if one cannot be found.public static PatternType fromString(String name)
UNKNOWN
if one cannot be found.