Package org.apache.kafka.common.acl
Class AccessControlEntryFilter
java.lang.Object
org.apache.kafka.common.acl.AccessControlEntryFilter
Represents a filter which matches access control entries.
The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AccessControlEntryFilter
Matches any access control entry. -
Constructor Summary
ConstructorDescriptionAccessControlEntryFilter
(String principal, String host, AclOperation operation, AclPermissionType permissionType) Create an instance of an access control entry filter with the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns a string describing an ANY or UNKNOWN field, or null if there is no such field.int
hashCode()
host()
Return the host or null.boolean
Return true if there are any UNKNOWN components.boolean
matches
(AccessControlEntry other) Returns true if this filter matches the given AccessControlEntry.boolean
Returns true if this filter could only match one ACE -- in other words, if there are no ANY or UNKNOWN fields.Return the AclOperation.Return the AclPermissionType.Return the principal or null.toString()
-
Field Details
-
ANY
Matches any access control entry.
-
-
Constructor Details
-
AccessControlEntryFilter
public AccessControlEntryFilter(String principal, String host, AclOperation operation, AclPermissionType permissionType) Create an instance of an access control entry filter with the provided parameters.- Parameters:
principal
- the principal or nullhost
- the host or nulloperation
- non-null operationpermissionType
- non-null permission type
-
-
Method Details
-
principal
Return the principal or null. -
host
Return the host or null. The value `*` means any host. -
operation
Return the AclOperation. -
permissionType
Return the AclPermissionType. -
toString
-
isUnknown
public boolean isUnknown()Return true if there are any UNKNOWN components. -
matches
Returns true if this filter matches the given AccessControlEntry. -
matchesAtMostOne
public boolean matchesAtMostOne()Returns true if this filter could only match one ACE -- in other words, if there are no ANY or UNKNOWN fields. -
findIndefiniteField
Returns a string describing an ANY or UNKNOWN field, or null if there is no such field. -
equals
-
hashCode
public int hashCode()
-