Package org.apache.kafka.common.acl
Class AclBindingFilter
- java.lang.Object
-
- org.apache.kafka.common.acl.AclBindingFilter
-
@Evolving public class AclBindingFilter extends java.lang.Object
A filter which can match AclBinding objects. The API for this class is still evolving and we may break compatibility in minor releases, if necessary.
-
-
Field Summary
Fields Modifier and Type Field Description static AclBindingFilterANYA filter which matches any ACL binding.
-
Constructor Summary
Constructors Constructor Description AclBindingFilter(ResourceFilter resourceFilter, AccessControlEntryFilter entryFilter)Deprecated.Since 2.0.AclBindingFilter(ResourcePatternFilter patternFilter, AccessControlEntryFilter entryFilter)Create an instance of this filter with the provided parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessControlEntryFilterentryFilter()booleanequals(java.lang.Object o)java.lang.StringfindIndefiniteField()Return a string describing an ANY or UNKNOWN field, or null if there is no such field.inthashCode()booleanisUnknown()booleanmatches(AclBinding binding)Return true if the resource filter matches the binding's resource and the entry filter matches binding's entry.booleanmatchesAtMostOne()Return true if the resource and entry filters can only match one ACE.ResourcePatternFilterpatternFilter()java.lang.StringtoString()
-
-
-
Field Detail
-
ANY
public static final AclBindingFilter ANY
A filter which matches any ACL binding.
-
-
Constructor Detail
-
AclBindingFilter
public AclBindingFilter(ResourcePatternFilter patternFilter, AccessControlEntryFilter entryFilter)
Create an instance of this filter with the provided parameters.- Parameters:
patternFilter- non-null pattern filterentryFilter- non-null access control entry filter
-
AclBindingFilter
@Deprecated public AclBindingFilter(ResourceFilter resourceFilter, AccessControlEntryFilter entryFilter)
Deprecated.Create an instance of this filter with the provided parameters.- Parameters:
resourceFilter- non-null resource filterentryFilter- non-null access control entry filter
-
-
Method Detail
-
isUnknown
public boolean isUnknown()
- Returns:
trueif this filter has any UNKNOWN components.
-
patternFilter
public ResourcePatternFilter patternFilter()
- Returns:
- the resource pattern filter.
-
entryFilter
public final AccessControlEntryFilter entryFilter()
- Returns:
- the access control entry filter.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
matchesAtMostOne
public boolean matchesAtMostOne()
Return true if the resource and entry filters can only match one ACE. In other words, if there are no ANY or UNKNOWN fields.
-
findIndefiniteField
public java.lang.String findIndefiniteField()
Return a string describing an ANY or UNKNOWN field, or null if there is no such field.
-
matches
public boolean matches(AclBinding binding)
Return true if the resource filter matches the binding's resource and the entry filter matches binding's entry.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-