@InterfaceStability.Evolving public enum ResourceType extends Enum<ResourceType>
Enum Constant and Description |
---|
ANY
In a filter, matches any ResourceType.
|
CLUSTER
The cluster as a whole.
|
DELEGATION_TOKEN
A token ID.
|
GROUP
A consumer group.
|
TOPIC
A Kafka topic.
|
TRANSACTIONAL_ID
A transactional ID.
|
UNKNOWN
Represents any ResourceType which this client cannot understand,
perhaps because this client is too old.
|
Modifier and Type | Method and Description |
---|---|
byte |
code()
Return the code of this resource.
|
static ResourceType |
fromCode(byte code)
Return the ResourceType with the provided code or `ResourceType.UNKNOWN` if one cannot be found.
|
static ResourceType |
fromString(String str)
Parse the given string as an ACL resource type.
|
boolean |
isUnknown()
Return whether this resource type is UNKNOWN.
|
static ResourceType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ResourceType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResourceType UNKNOWN
public static final ResourceType ANY
public static final ResourceType TOPIC
public static final ResourceType GROUP
public static final ResourceType CLUSTER
public static final ResourceType TRANSACTIONAL_ID
public static final ResourceType DELEGATION_TOKEN
public static ResourceType[] values()
for (ResourceType c : ResourceType.values())
System.out.println(c);
public static ResourceType 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 static ResourceType fromString(String str) throws IllegalArgumentException
str
- The string to parse.IllegalArgumentException
public static ResourceType fromCode(byte code)
public byte code()
public boolean isUnknown()