You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
541 B
33 lines
541 B
package com.mh.user.constants; |
|
|
|
/** |
|
* @author LJF |
|
* @version 1.0 |
|
* @project springboot-mqtt-demo |
|
* @description 采用哪种协议进行数据交互 |
|
* @date 2024-10-29 15:21:07 |
|
*/ |
|
public enum MqttProtocolEnum { |
|
|
|
MQTT("tcp"), |
|
|
|
MQTTS("tcp"), |
|
|
|
WS("ws"), |
|
|
|
WSS("wss"); |
|
|
|
final String protocol; |
|
|
|
MqttProtocolEnum(String protocol) { |
|
this.protocol = protocol; |
|
} |
|
|
|
public String getProtocolAddr() { |
|
return protocol + "://"; |
|
} |
|
|
|
public String getProtocol() { |
|
return protocol; |
|
} |
|
}
|
|
|