public enum TopicFilterType extends Enum<TopicFilterType>
| Enum Constant and Description |
|---|
NONE
默认 TopicFilter
|
QUEUE
$queue/ 为前缀的共享订阅是不带群组的共享订阅
|
SHARE
$share/{group-name}/ 为前缀的共享订阅是带群组的共享订阅
|
| Modifier and Type | Field and Description |
|---|---|
static String |
SHARE_GROUP_PREFIX |
static String |
SHARE_QUEUE_PREFIX
共享订阅的 topic
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getShareGroupName(String topicFilter)
读取共享订阅的分组名
|
abstract Map<String,String> |
getTopicVars(String topicTemplate,
String topic)
解析 topic 模板中的变量 例如 $SYS/brokers/${node}/clients/${clientid}/disconnected 中提取 node 和 clientid
|
static TopicFilterType |
getType(String topicFilter)
获取 topicFilter 类型
|
abstract boolean |
match(String topicFilter,
String topicName)
判断 topicFilter 和 topicName 匹配情况
|
static TopicFilterType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TopicFilterType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TopicFilterType NONE
public static final TopicFilterType QUEUE
public static final TopicFilterType SHARE
public static final String SHARE_QUEUE_PREFIX
public static final String SHARE_GROUP_PREFIX
public static TopicFilterType[] values()
for (TopicFilterType c : TopicFilterType.values()) System.out.println(c);
public static TopicFilterType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean match(String topicFilter, String topicName)
topicFilter - topicFiltertopicName - topicNamepublic abstract Map<String,String> getTopicVars(String topicTemplate, String topic)
topicTemplate - topicTemplatetopic - topicpublic static TopicFilterType getType(String topicFilter)
topicFilter - topicFilterCopyright © 2025. All rights reserved.