Package org.apache.kafka.common.resource
Class ResourcePattern
java.lang.Object
org.apache.kafka.common.resource.ResourcePattern
@Evolving public class ResourcePattern extends Object
Represents a pattern that is used by ACLs to match zero or more
Resources
.
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 String
WILDCARD_RESOURCE
A special literal resource name that corresponds to 'all resources of a certain type'. -
Constructor Summary
Constructors Constructor Description ResourcePattern(ResourceType resourceType, String name, PatternType patternType)
Create a pattern using the supplied parameters. -
Method Summary
Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
boolean
isUnknown()
String
name()
PatternType
patternType()
ResourceType
resourceType()
ResourcePatternFilter
toFilter()
String
toString()
-
Field Details
-
WILDCARD_RESOURCE
A special literal resource name that corresponds to 'all resources of a certain type'.- See Also:
- Constant Field Values
-
-
Constructor Details
-
ResourcePattern
Create a pattern using the supplied parameters.- Parameters:
resourceType
- non-null, specific, resource typename
- non-null resource name, which can be theWILDCARD_RESOURCE
.patternType
- non-null, specific, resource pattern type, which controls how the pattern will match resource names.
-
-
Method Details
-
resourceType
- Returns:
- the specific resource type this pattern matches
-
name
- Returns:
- the resource name.
-
patternType
- Returns:
- the resource pattern type.
-
toFilter
- Returns:
- a filter which matches only this pattern.
-
toString
-
isUnknown
public boolean isUnknown()- Returns:
true
if this Resource has any UNKNOWN components.
-
equals
-
hashCode
public int hashCode()
-