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.
108 lines
2.2 KiB
108 lines
2.2 KiB
package com.mh.user.constants; |
|
|
|
/** |
|
* @author LJF |
|
* @version 1.0 |
|
* @project springboot-mqtt-demo |
|
* @description mqtt连接的参数 |
|
* @date 2024-10-29 14:46:24 |
|
*/ |
|
public class MqttClientOptions { |
|
|
|
private MqttProtocolEnum protocol; |
|
|
|
private String host; |
|
|
|
private Integer port; |
|
|
|
private String username; |
|
|
|
private String password; |
|
|
|
private String clientId; |
|
|
|
private String path; |
|
|
|
/** |
|
* 客户端连接的时候,订阅的主题 |
|
*/ |
|
private String inboundTopic; |
|
|
|
public MqttProtocolEnum getProtocol() { |
|
return protocol; |
|
} |
|
|
|
public void setProtocol(MqttProtocolEnum protocol) { |
|
this.protocol = protocol; |
|
} |
|
|
|
public String getHost() { |
|
return host; |
|
} |
|
|
|
public void setHost(String host) { |
|
this.host = host; |
|
} |
|
|
|
public Integer getPort() { |
|
return port; |
|
} |
|
|
|
public void setPort(Integer port) { |
|
this.port = port; |
|
} |
|
|
|
public String getUsername() { |
|
return username; |
|
} |
|
|
|
public void setUsername(String username) { |
|
this.username = username; |
|
} |
|
|
|
public String getPassword() { |
|
return password; |
|
} |
|
|
|
public void setPassword(String password) { |
|
this.password = password; |
|
} |
|
|
|
public String getClientId() { |
|
return clientId; |
|
} |
|
|
|
public void setClientId(String clientId) { |
|
this.clientId = clientId; |
|
} |
|
|
|
public String getPath() { |
|
return path; |
|
} |
|
|
|
public void setPath(String path) { |
|
this.path = path; |
|
} |
|
|
|
public String getInboundTopic() { |
|
return inboundTopic; |
|
} |
|
|
|
public void setInboundTopic(String inboundTopic) { |
|
this.inboundTopic = inboundTopic; |
|
} |
|
|
|
@Override |
|
public String toString() { |
|
return "MqttClientOptions{" + |
|
"protocol=" + protocol + |
|
", host='" + host + '\'' + |
|
", port=" + port + |
|
", username='" + username + '\'' + |
|
", password='" + password + '\'' + |
|
", clientId='" + clientId + '\'' + |
|
", path='" + path + '\'' + |
|
", inboundTopic='" + inboundTopic + '\'' + |
|
'}'; |
|
} |
|
}
|
|
|