public enum MessageType extends Enum<MessageType>
| 枚举常量和说明 |
|---|
CONNECT
连接
|
DISCONNECT
断开连接
|
DOWN_STREAM
下行数据
|
SUBSCRIBE
主题订阅
|
UNSUBSCRIBE
取消订阅
|
UP_STREAM
上行数据
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getValue() |
static MessageType |
valueOf(int type) |
static MessageType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static MessageType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final MessageType CONNECT
public static final MessageType SUBSCRIBE
public static final MessageType UNSUBSCRIBE
public static final MessageType UP_STREAM
public static final MessageType DOWN_STREAM
public static final MessageType DISCONNECT
public static MessageType[] values()
for (MessageType c : MessageType.values()) System.out.println(c);
public static MessageType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public int getValue()
public static MessageType valueOf(int type)
Copyright © 2022. All rights reserved.