All Downloads are FREE. Search and download functionalities are using the official Maven repository.

HslCommunication.MQTT.MqttCredential Maven / Gradle / Ivy

Go to download

一个工业物联网的底层架构框架,专注于底层的技术通信及跨平台,跨语言通信功能,实现各种主流的PLC数据读写,实现modbus的各种协议读写等等

There is a newer version: 3.7.0
Show newest version
package HslCommunication.MQTT;

/**
 * Mqtt协议的验证对象,包含用户名和密码
* Authentication object of Mqtt protocol, including username and password */ public class MqttCredential { // region Constructor /** * 实例化一个默认的对象
* Instantiate a default object */ public MqttCredential( ) { } /** * 实例化指定的用户名和密码的对象
* Instantiates an object with the specified username and password * @param name 用户名 * @param pwd 密码 */ public MqttCredential(String name, String pwd ) { UserName = name; Password = pwd; } // endregion /** * 获取当前连接的用户名
* Get username * @return 用户名数据 */ public String getUserName() { return UserName; } /** * 设置当前的连接的用户名
* Set username * @param userName 用户名数据 */ public void setUserName(String userName) { UserName = userName; } /** * 获取当前连接的密码
* Get password * @return 密码信息 */ public String getPassword() { return Password; } /** * 设置当前连接的密码
* Set password * @param password 密码数据 */ public void setPassword(String password) { Password = password; } private String UserName = null; private String Password = null; public String toString( ) { return UserName; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy