Enum PatternType

    • Enum Constant Detail

      • UNKNOWN

        public static final PatternType UNKNOWN
        Represents any PatternType which this client cannot understand, perhaps because this client is too old.
      • ANY

        public static final PatternType ANY
        In a filter, matches any resource pattern type.
      • MATCH

        public static final PatternType MATCH
        In a filter, will perform pattern matching. e.g. Given a filter of ResourcePatternFilter(TOPIC, "payments.received", MATCH)`, the filter match any ResourcePattern that matches topic 'payments.received'. This might include:
        • A Literal pattern with the same type and name, e.g. ResourcePattern(TOPIC, "payments.received", LITERAL)
        • A Wildcard pattern with the same type, e.g. ResourcePattern(TOPIC, "*", LITERAL)
        • A Prefixed pattern with the same type and where the name is a matching prefix, e.g. ResourcePattern(TOPIC, "payments.", PREFIXED)
      • LITERAL

        public static final PatternType LITERAL
        A literal resource name. A literal name defines the full name of a resource, e.g. topic with name 'foo', or group with name 'bob'. The special wildcard character * can be used to represent a resource with any name.
      • PREFIXED

        public static final PatternType PREFIXED
        A prefixed resource name. A prefixed name defines a prefix for a resource, e.g. topics with names that start with 'foo'.
    • Method Detail

      • values

        public static PatternType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (PatternType c : PatternType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static PatternType valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • code

        public byte code()
        Returns:
        the code of this resource.
      • isUnknown

        public boolean isUnknown()
        Returns:
        whether this resource pattern type is UNKNOWN.
      • isSpecific

        public boolean isSpecific()
        Returns:
        whether this resource pattern type is a concrete type, rather than UNKNOWN or one of the filter types.
      • fromCode

        public static PatternType fromCode​(byte code)
        Return the PatternType with the provided code or UNKNOWN if one cannot be found.
      • fromString

        public static PatternType fromString​(String name)
        Return the PatternType with the provided name or UNKNOWN if one cannot be found.