public class TransportParameter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TransportParameter.CloseAction
Automatic connector closing actions.
|
static class |
TransportParameter.TransportParameterBuilder
A builder for transport parameter.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
actionTimeout |
private String |
applicationId |
private String |
authenticationKey |
private boolean |
autoApplicationId |
private TransportParameter.CloseAction |
closeAction |
private String |
host |
private boolean |
hostnameVerification |
private int |
keepAlive |
private String |
keyAlias |
private String |
keyPassword |
private File |
keystore |
private String |
password |
private int |
port |
private MqttQoS |
qos |
private String |
user |
| Modifier | Constructor and Description |
|---|---|
private |
TransportParameter(String host,
int port)
Creates a transport parameter instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getActionTimeout()
Returns the timeout for individual send/receive actions.
|
String |
getApplicationId()
Returns the unique application/client identifier.
|
String |
getAuthenticationKey()
Returns the
IdentityStore key for the authentication, usually a password token. |
boolean |
getAutoApplicationId()
Returns whether the application identification is expected to be unique or shall be made unique upon first
connect.
|
TransportParameter.CloseAction |
getCloseAction()
Returns the close action.
|
String |
getHost()
Returns the network name of the host.
|
boolean |
getHostnameVerification()
Returns whether TLS hostname verification shall be performed.
|
int |
getKeepAlive()
Returns the time to keep a connection alive.
|
String |
getKeyAlias()
Returns the alias of the key in
getKeystore() to use. |
File |
getKeystore()
Returns the optional TLS keystore.
|
String |
getKeystorePassword()
Returns the password for the optional TLS keystore.
|
MqttQoS |
getMqttQoS()
Returns the MQTT QoS level (may not apply to other protocols).
|
String |
getPassword()
Deprecated.
#22, use
getAuthenticationKey() instead |
int |
getPort()
Returns the TCP communication port of the host.
|
String |
getUser()
Deprecated.
#22, use
getAuthenticationKey() instead |
private String host
private int port
private int actionTimeout
private String applicationId
private boolean autoApplicationId
private int keepAlive
private File keystore
private String keyPassword
private String keyAlias
private boolean hostnameVerification
private String authenticationKey
private String user
private String password
private MqttQoS qos
private TransportParameter.CloseAction closeAction
private TransportParameter(String host, int port)
host - the network name of the hostport - the TCP communication port of the hostpublic String getHost()
public int getPort()
public int getActionTimeout()
public int getKeepAlive()
public String getApplicationId()
public boolean getAutoApplicationId()
true (default) for make unique, false elsepublic String getPassword()
getAuthenticationKey() insteadpublic String getUser()
getAuthenticationKey() insteadpublic File getKeystore()
public String getKeystorePassword()
IdentityStore to obtain a password token before using it as a plaintext password as
fallbackpublic String getKeyAlias()
getKeystore() to use.public String getAuthenticationKey()
IdentityStore key for the authentication, usually a password token.public boolean getHostnameVerification()
false for no verification (default), true elsepublic MqttQoS getMqttQoS()
public TransportParameter.CloseAction getCloseAction()
TransportParameter.CloseAction.UNSUBSCRIBE)Copyright © 2022. All rights reserved.