Package org.apache.kafka.common.acl
Class AccessControlEntry
- java.lang.Object
-
- org.apache.kafka.common.acl.AccessControlEntry
-
@Evolving public class AccessControlEntry extends java.lang.Object
Represents an access control entry. ACEs are a tuple of principal, host, operation, and permissionType. The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
-
-
Constructor Summary
Constructors Constructor Description AccessControlEntry(java.lang.String principal, java.lang.String host, AclOperation operation, AclPermissionType permissionType)Create an instance of an access control entry with the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.Stringhost()Return the host or `*` for all hosts.booleanisUnknown()Return true if this AclResource has any UNKNOWN components.AclOperationoperation()Return the AclOperation.AclPermissionTypepermissionType()Return the AclPermissionType.java.lang.Stringprincipal()Return the principal for this entry.AccessControlEntryFiltertoFilter()Create a filter which matches only this AccessControlEntry.java.lang.StringtoString()
-
-
-
Constructor Detail
-
AccessControlEntry
public AccessControlEntry(java.lang.String principal, java.lang.String host, AclOperation operation, AclPermissionType permissionType)Create an instance of an access control entry with the provided parameters.- Parameters:
principal- non-null principalhost- non-null hostoperation- non-null operation, ANY is not an allowed operationpermissionType- non-null permission type, ANY is not an allowed type
-
-
Method Detail
-
principal
public java.lang.String principal()
Return the principal for this entry.
-
host
public java.lang.String host()
Return the host or `*` for all hosts.
-
operation
public AclOperation operation()
Return the AclOperation. This method will never return AclOperation.ANY.
-
permissionType
public AclPermissionType permissionType()
Return the AclPermissionType. This method will never return AclPermissionType.ANY.
-
toFilter
public AccessControlEntryFilter toFilter()
Create a filter which matches only this AccessControlEntry.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isUnknown
public boolean isUnknown()
Return true if this AclResource has any UNKNOWN components.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-