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.IMqttAsyncClient |
getAsyncClientInstance(String uri,
String clientId)
Retrieve an async client instance.
|
org.eclipse.paho.client.mqttv3.IMqttClient |
getClientInstance(String uri,
String clientId)
Retrieve a client instance.
|
org.eclipse.paho.client.mqttv3.MqttConnectOptions |
getConnectionOptions()
Retrieve the connection options.
|
ConsumerStopAction |
getConsumerStopAction()
Get the consumer stop action.
|
void |
setConnectionOptions(org.eclipse.paho.client.mqttv3.MqttConnectOptions options)
Set the preconfigured
MqttConnectOptions. |
void |
setConsumerStopAction(ConsumerStopAction consumerStopAction)
Set the consumer stop action.
|
void |
setPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence)
Set the persistence to pass into the client constructor.
|
public void setPersistence(org.eclipse.paho.client.mqttv3.MqttClientPersistence persistence)
persistence - the persistence to set.public ConsumerStopAction getConsumerStopAction()
getConsumerStopAction in interface MqttPahoClientFactorypublic void setConsumerStopAction(ConsumerStopAction consumerStopAction)
ConsumerStopAction.UNSUBSCRIBE_CLEAN.consumerStopAction - the consumer stop action.public org.eclipse.paho.client.mqttv3.IMqttClient getClientInstance(String uri, String clientId) throws org.eclipse.paho.client.mqttv3.MqttException
MqttPahoClientFactorygetClientInstance in interface MqttPahoClientFactoryuri - The URL.clientId - The client id.org.eclipse.paho.client.mqttv3.MqttException - Any.public org.eclipse.paho.client.mqttv3.IMqttAsyncClient getAsyncClientInstance(String uri, String clientId) throws org.eclipse.paho.client.mqttv3.MqttException
MqttPahoClientFactorygetAsyncClientInstance in interface MqttPahoClientFactoryuri - The URL.clientId - The client id.org.eclipse.paho.client.mqttv3.MqttException - Any.public void setConnectionOptions(org.eclipse.paho.client.mqttv3.MqttConnectOptions options)
MqttConnectOptions.options - the options.public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectionOptions()
MqttPahoClientFactorygetConnectionOptions in interface MqttPahoClientFactory