public class DefaultMqttPahoClientFactory extends Object implements MqttPahoClientFactory
MqttClient
and a set of options as configured.Modifier and Type | Class and Description |
---|---|
static class |
DefaultMqttPahoClientFactory.Will |
Constructor and Description |
---|
DefaultMqttPahoClientFactory() |
Modifier and Type | Method and Description |
---|---|
org.eclipse.paho.client.mqttv3.MqttClient |
getClientInstance(String url,
String clientId)
Retrieve a client instance.
|
org.eclipse.paho.client.mqttv3.MqttConnectOptions |
getConnectionOptions()
Retrieve the connection options.
|
void |
setCleanSession(Boolean cleanSession) |
void |
setConnectionTimeout(Integer connectionTimeout) |
void |
setKeepAliveInterval(Integer keepAliveInterval) |
void |
setPassword(String password) |
void |
setPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence) |
void |
setSocketFactory(SocketFactory socketFactory) |
void |
setSslProperties(Properties sslProperties) |
void |
setUserName(String userName) |
void |
setWill(DefaultMqttPahoClientFactory.Will will)
Will be used to set the "Last Will and Testament" (LWT) for the connection.
|
public void setCleanSession(Boolean cleanSession)
public void setConnectionTimeout(Integer connectionTimeout)
public void setKeepAliveInterval(Integer keepAliveInterval)
public void setPassword(String password)
public void setSocketFactory(SocketFactory socketFactory)
public void setSslProperties(Properties sslProperties)
public void setUserName(String userName)
public void setWill(DefaultMqttPahoClientFactory.Will will)
will
- The will.MqttConnectOptions
public void setPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence)
public org.eclipse.paho.client.mqttv3.MqttClient getClientInstance(String url, String clientId) throws org.eclipse.paho.client.mqttv3.MqttException
MqttPahoClientFactory
getClientInstance
in interface MqttPahoClientFactory
url
- The URL.clientId
- The client id.org.eclipse.paho.client.mqttv3.MqttException
- Any.public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectionOptions()
MqttPahoClientFactory
getConnectionOptions
in interface MqttPahoClientFactory