Enum Class ResourceType
- All Implemented Interfaces:
Serializable,Comparable<ResourceType>,Constable
Represents a type of resource which an ACL can be applied to.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIn a filter, matches any ResourceType.The cluster as a whole.A token ID.A consumer group.A Kafka topic.A transactional ID.Represents any ResourceType which this client cannot understand, perhaps because this client is too old.A user principal -
Method Summary
Modifier and TypeMethodDescriptionbytecode()Return the code of this resource.static ResourceTypefromCode(byte code) Return the ResourceType with the provided code or `ResourceType.UNKNOWN` if one cannot be found.static ResourceTypefromString(String str) Parse the given string as an ACL resource type.booleanReturn whether this resource type is UNKNOWN.static ResourceTypeReturns the enum constant of this class with the specified name.static ResourceType[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
UNKNOWN
Represents any ResourceType which this client cannot understand, perhaps because this client is too old. -
ANY
In a filter, matches any ResourceType. -
TOPIC
A Kafka topic. -
GROUP
A consumer group. -
CLUSTER
The cluster as a whole. -
TRANSACTIONAL_ID
A transactional ID. -
DELEGATION_TOKEN
A token ID. -
USER
A user principal
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
Parse the given string as an ACL resource type.- Parameters:
str- The string to parse.- Returns:
- The ResourceType, or UNKNOWN if the string could not be matched.
- Throws:
IllegalArgumentException
-
fromCode
Return the ResourceType with the provided code or `ResourceType.UNKNOWN` if one cannot be found. -
code
public byte code()Return the code of this resource. -
isUnknown
public boolean isUnknown()Return whether this resource type is UNKNOWN.
-