Enum Class TopicFilterType

java.lang.Object
java.lang.Enum<TopicFilterType>
org.dromara.mica.mqtt.core.common.TopicFilterType
All Implemented Interfaces:
Serializable, Comparable<TopicFilterType>, java.lang.constant.Constable

public enum TopicFilterType extends Enum<TopicFilterType>
TopicFilter 类型
Author:
L.cm
  • Enum Constant Details

    • NONE

      public static final TopicFilterType NONE
      默认 TopicFilter
    • QUEUE

      public static final TopicFilterType QUEUE
      $queue/ 为前缀的共享订阅是不带群组的共享订阅
    • SHARE

      public static final TopicFilterType SHARE
      $share/{group-name}/ 为前缀的共享订阅是带群组的共享订阅
  • Field Details

  • Method Details

    • values

      public static TopicFilterType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TopicFilterType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • match

      public abstract boolean match(String topicFilter, String topicName)
      判断 topicFilter 和 topicName 匹配情况
      Parameters:
      topicFilter - topicFilter
      topicName - topicName
      Returns:
      是否匹配
    • getType

      public static TopicFilterType getType(String topicFilter)
      获取 topicFilter 类型
      Parameters:
      topicFilter - topicFilter
      Returns:
      TopicFilterType
    • getShareGroupName

      public static String getShareGroupName(String topicFilter)
      读取共享订阅的分组名
      Parameters:
      topicFilter - topicFilter
      Returns:
      共享订阅分组名