Package io.micronaut.mqtt.v3.config
Class MqttClientConfigurationProperties
java.lang.Object
io.micronaut.mqtt.v3.config.MqttClientConfigurationProperties
- All Implemented Interfaces:
MqttSSLConfiguration
@ConfigurationProperties("mqtt.client")
public class MqttClientConfigurationProperties
extends Object
implements MqttSSLConfiguration
Configuration for the MQTT client.
- Since:
- 1.0.0
- Author:
- James Kleeh
-
Constructor Summary
ConstructorDescriptionMqttClientConfigurationProperties
(io.micronaut.mqtt.v3.config.MqttClientConfigurationProperties.WillMessage willMessage) -
Method Summary
Modifier and TypeMethodDescription@NotNull String
org.eclipse.paho.client.mqttv3.MqttConnectOptions
@NotNull String
boolean
void
setClientId
(String clientId) void
setConnectionTimeout
(Duration connectionTimeout) void
setHttpsHostnameVerificationEnabled
(boolean httpsHostnameVerificationEnabled) void
setManualAcks
(Boolean manualAcks) void
setServerUri
(String serverUri) void
setSocketFactory
(SocketFactory socketFactory) void
setSSLHostnameVerifier
(HostnameVerifier hostnameVerifier) void
setSSLProperties
(Properties props)
-
Constructor Details
-
MqttClientConfigurationProperties
public MqttClientConfigurationProperties(io.micronaut.mqtt.v3.config.MqttClientConfigurationProperties.WillMessage willMessage)
-
-
Method Details
-
getConnectOptions
public org.eclipse.paho.client.mqttv3.MqttConnectOptions getConnectOptions()- Returns:
- The connection options
-
getServerUri
- Returns:
- The server URI
-
setServerUri
- Parameters:
serverUri
- The server URI
-
getClientId
- Returns:
- The client id
-
setClientId
- Parameters:
clientId
- The client ID
-
getConnectionTimeout
- Returns:
- The connection timeout
-
setConnectionTimeout
- Parameters:
connectionTimeout
- How long to wait for a connection
-
getManualAcks
- Returns:
- An optional boolean to set the client in manual acknowledge mode
-
setManualAcks
- Parameters:
manualAcks
- Set to true if you wish to manually acknowledge messages
-
getSocketFactory
- Specified by:
getSocketFactory
in interfaceMqttSSLConfiguration
-
setSocketFactory
- Specified by:
setSocketFactory
in interfaceMqttSSLConfiguration
-
getSSLProperties
- Specified by:
getSSLProperties
in interfaceMqttSSLConfiguration
-
setSSLProperties
- Specified by:
setSSLProperties
in interfaceMqttSSLConfiguration
-
isHttpsHostnameVerificationEnabled
public boolean isHttpsHostnameVerificationEnabled()- Specified by:
isHttpsHostnameVerificationEnabled
in interfaceMqttSSLConfiguration
-
setHttpsHostnameVerificationEnabled
public void setHttpsHostnameVerificationEnabled(boolean httpsHostnameVerificationEnabled) - Specified by:
setHttpsHostnameVerificationEnabled
in interfaceMqttSSLConfiguration
-
getSSLHostnameVerifier
- Specified by:
getSSLHostnameVerifier
in interfaceMqttSSLConfiguration
-
setSSLHostnameVerifier
- Specified by:
setSSLHostnameVerifier
in interfaceMqttSSLConfiguration
-