public abstract class MQTT3ConnectionProvider extends Object implements org.mule.runtime.api.connection.CachedConnectionProvider<MQTT3Connection>, org.mule.runtime.api.lifecycle.Initialisable
| Modifier and Type | Field and Description |
|---|---|
protected ClientIDGenerator |
clientIDGenerator
A
ClientIDGenerator that generates a Client ID to identify a connection to the MQTT broker. |
protected MQTT3ConnectionOptions |
connectionOptions
The provided
MQTT3ConnectionOptions. |
protected static String |
DRIVER_FILE_NAME_PATTERN |
protected MQTT3FilePersistenceOptions |
filePersistenceOptions
The provided
MQTT3FilePersistenceOptions. |
protected LWTMessage |
lastWillAndTestament
The
LWTMessage to be set. |
protected static String |
MQTT_CONNECTION_CLASS_NAME |
protected static String |
MQTT_DEPENDENCY |
protected String |
password
Password to be used when providing authentication credentials to the MQTT broker.
|
protected org.mule.runtime.api.tls.TlsContextFactory |
tlsContextFactory
A factory for TLS contexts.
|
protected String |
username
Username to be used when providing authentication credentials to the MQTT broker.
|
| Constructor and Description |
|---|
MQTT3ConnectionProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
configureMqttConnectOptions(MQTT3Connection mqtt3Connection)
Sets specific configuration options for an
MQTT3Connection |
MQTT3Connection |
connect() |
void |
disconnect(MQTT3Connection connection) |
boolean |
equals(Object o) |
protected abstract String |
getUrl() |
int |
hashCode() |
void |
initialise() |
org.mule.runtime.api.connection.ConnectionValidationResult |
validate(MQTT3Connection connection)
Validates the provided
MQTT3Connection by testing its connectivity. |
protected static final String DRIVER_FILE_NAME_PATTERN
protected static final String MQTT_CONNECTION_CLASS_NAME
protected static final String MQTT_DEPENDENCY
@Parameter @Summary(value="The generator used to create a connection\'s client id") protected ClientIDGenerator clientIDGenerator
ClientIDGenerator that generates a Client ID to identify a connection to the MQTT broker.@Parameter @Optional @Username @Summary(value="The username used when providing authentication credentials to the MQTT broker") protected String username
@Parameter @Optional @Password @Summary(value="The password to be used when providing authentication credentials to the MQTT broker") protected String password
@Parameter @Optional @Expression(value=NOT_SUPPORTED) @Placement(tab="SSL/TLS") @DisplayName(value="TLS Context") @Summary(value="The TLS factory used to create TLS secured connections") protected org.mule.runtime.api.tls.TlsContextFactory tlsContextFactory
@Parameter
@Expression(value=NOT_SUPPORTED)
@Placement(tab="LWT")
@DisplayName(value="Last Will and Testament (LWT)")
@ParameterGroup(name="Last Will and Testament",
showInDsl=true)
@Summary(value="The Last Will And Testament message to be set for this client")
protected LWTMessage lastWillAndTestament
LWTMessage to be set.@NullSafe
@ParameterGroup(name="Connection Options",
showInDsl=true)
@Summary(value="A group of advanced connection options")
protected MQTT3ConnectionOptions connectionOptions
MQTT3ConnectionOptions.@NullSafe
@ParameterGroup(name="File Persistence Options",
showInDsl=true)
protected MQTT3FilePersistenceOptions filePersistenceOptions
MQTT3FilePersistenceOptions.public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic MQTT3Connection connect() throws org.mule.runtime.api.connection.ConnectionException
connect in interface org.mule.runtime.api.connection.ConnectionProvider<MQTT3Connection>org.mule.runtime.api.connection.ConnectionExceptionprotected abstract void configureMqttConnectOptions(MQTT3Connection mqtt3Connection) throws org.mule.runtime.api.connection.ConnectionException
MQTT3Connectionmqtt3Connection - an instance of MQTT3Connectionorg.mule.runtime.api.connection.ConnectionExceptionprotected abstract String getUrl()
public void disconnect(MQTT3Connection connection)
disconnect in interface org.mule.runtime.api.connection.ConnectionProvider<MQTT3Connection>public org.mule.runtime.api.connection.ConnectionValidationResult validate(MQTT3Connection connection)
MQTT3Connection by testing its connectivity.
Returns a ConnectionValidationResult indicating whether the connection is valid.validate in interface org.mule.runtime.api.connection.ConnectionProvider<MQTT3Connection>connection - the MQTT3Connection instance to validateConnectionValidationResult representing the outcome of the validationCopyright © 2025 MuleSoft, Inc.. All rights reserved.