Package br.com.anteros.mqtt.core.common
Enum TopicFilterType
- java.lang.Object
-
- java.lang.Enum<TopicFilterType>
-
- br.com.anteros.mqtt.core.common.TopicFilterType
-
- All Implemented Interfaces:
Serializable,Comparable<TopicFilterType>
public enum TopicFilterType extends Enum<TopicFilterType>
TopicFilter 类型- Author:
- L.cm
-
-
Field Summary
Fields Modifier and Type Field Description static StringSHARE_GROUP_PREFIXstatic StringSHARE_QUEUE_PREFIX共享订阅的 topic
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static TopicFilterTypegetType(String topicFilter)获取 topicFilter 类型abstract booleanmatch(String topicFilter, String topicName)判断 topicFilter 和 topicName 匹配情况static TopicFilterTypevalueOf(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.
-
-
-
Enum Constant Detail
-
NONE
public static final TopicFilterType NONE
默认 TopicFilter
-
QUEUE
public static final TopicFilterType QUEUE
$queue/ 为前缀的共享订阅是不带群组的共享订阅
-
SHARE
public static final TopicFilterType SHARE
$share/{group-name}/ 为前缀的共享订阅是带群组的共享订阅
-
-
Field Detail
-
SHARE_QUEUE_PREFIX
public static final String SHARE_QUEUE_PREFIX
共享订阅的 topic- See Also:
- Constant Field Values
-
SHARE_GROUP_PREFIX
public static final String SHARE_GROUP_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static TopicFilterType[] 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 (TopicFilterType c : TopicFilterType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TopicFilterType 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 nameNullPointerException- if the argument is null
-
match
public abstract boolean match(String topicFilter, String topicName)
判断 topicFilter 和 topicName 匹配情况- Parameters:
topicFilter- topicFiltertopicName- topicName- Returns:
- 是否匹配
-
getType
public static TopicFilterType getType(String topicFilter)
获取 topicFilter 类型- Parameters:
topicFilter- topicFilter- Returns:
- TopicFilterType
-
-