Class 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 Detail


        public static final String WILDCARD_RESOURCE
        A special literal resource name that corresponds to 'all resources of a certain type'.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourcePattern

        public ResourcePattern​(ResourceType resourceType,
                               String name,
                               PatternType patternType)
        Create a pattern using the supplied parameters.
        resourceType - non-null, specific, resource type
        name - non-null resource name, which can be the WILDCARD_RESOURCE.
        patternType - non-null, specific, resource pattern type, which controls how the pattern will match resource names.
    • Method Detail

      • resourceType

        public ResourceType resourceType()
        the specific resource type this pattern matches
      • name

        public String name()
        the resource name.
      • patternType

        public PatternType patternType()
        the resource pattern type.
      • isUnknown

        public boolean isUnknown()
        true if this Resource has any UNKNOWN components.
      • hashCode

        public int hashCode()
        hashCode in class Object