Package org.apache.kafka.common.acl
Class AccessControlEntryFilter
- java.lang.Object
-
- org.apache.kafka.common.acl.AccessControlEntryFilter
-
-
Field Summary
Fields Modifier and Type Field Description static AccessControlEntryFilter
ANY
Matches any access control entry.
-
Constructor Summary
Constructors Constructor Description AccessControlEntryFilter(String principal, String host, AclOperation operation, AclPermissionType permissionType)
Create an instance of an access control entry filter with the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
findIndefiniteField()
Returns a string describing an ANY or UNKNOWN field, or null if there is no such field.int
hashCode()
String
host()
Return the host or null.boolean
isUnknown()
Return true if there are any UNKNOWN components.boolean
matches(AccessControlEntry other)
Returns true if this filter matches the given AccessControlEntry.boolean
matchesAtMostOne()
Returns true if this filter could only match one ACE -- in other words, if there are no ANY or UNKNOWN fields.AclOperation
operation()
Return the AclOperation.AclPermissionType
permissionType()
Return the AclPermissionType.String
principal()
Return the principal or null.String
toString()
-
-
-
Field Detail
-
ANY
public static final AccessControlEntryFilter ANY
Matches any access control entry.
-
-
Constructor Detail
-
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 Detail
-
principal
public String principal()
Return the principal or null.
-
host
public String host()
Return the host or null. The value `*` means any host.
-
operation
public AclOperation operation()
Return the AclOperation.
-
permissionType
public AclPermissionType permissionType()
Return the AclPermissionType.
-
isUnknown
public boolean isUnknown()
Return true if there are any UNKNOWN components.
-
matches
public boolean matches(AccessControlEntry other)
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
public String findIndefiniteField()
Returns a string describing an ANY or UNKNOWN field, or null if there is no such field.
-
-