Package org.apache.kafka.common.acl
Enum Class AclPermissionType
- All Implemented Interfaces:
Serializable
,Comparable<AclPermissionType>
,Constable
Represents whether an ACL grants or denies permissions.
The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
code()
Return the code of this permission type.static AclPermissionType
fromCode
(byte code) Return the AclPermissionType with the provided code or `AclPermissionType.UNKNOWN` if one cannot be found.static AclPermissionType
fromString
(String str) Parse the given string as an ACL permission.boolean
Return true if this permission type is UNKNOWN.static AclPermissionType
Returns the enum constant of this class with the specified name.static AclPermissionType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
Represents any AclPermissionType which this client cannot understand, perhaps because this client is too old. -
ANY
In a filter, matches any AclPermissionType. -
DENY
Disallows access. -
ALLOW
Grants access.
-
-
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 permission.- Parameters:
str
- The string to parse.- Returns:
- The AclPermissionType, or UNKNOWN if the string could not be matched.
-
fromCode
Return the AclPermissionType with the provided code or `AclPermissionType.UNKNOWN` if one cannot be found. -
code
public byte code()Return the code of this permission type. -
isUnknown
public boolean isUnknown()Return true if this permission type is UNKNOWN.
-