public class

MqttConnectorConnectionManager

extends Object
implements MuleContextAware Initialisable Capabilities MetadataAware ConnectionManager<K, C extends Connection> ProcessAdapter<O>
java.lang.Object
   ↳ org.mule.modules.mqtt.connectivity.MqttConnectorConnectionManager

Class Overview

A MqttConnectorConnectionManager is a wrapper around MqttConnector that adds connection management capabilities to the pojo.

Summary

Constants
String DEVKIT_BUILD
String DEVKIT_VERSION
String MODULE_NAME
String MODULE_VERSION
[Expand]
Inherited Constants
From interface org.mule.api.lifecycle.Initialisable
Fields
private String brokerServerUri
private boolean cleanSession
private String clientId
private GenericKeyedObjectPool connectionPool Connector Pool
protected PoolingProfile connectionPoolingProfile
private int connectionTimeout
protected FlowConstruct flowConstruct Flow Construct
private int keepAliveInterval
private String lwtMessage
private int lwtQos
private boolean lwtRetained
private String lwtTopicName
protected MuleContext muleContext Mule Context
private String password
private String persistenceLocation
protected RetryPolicyTemplate retryPolicyTemplate
private String username
Public Constructors
MqttConnectorConnectionManager()
Public Methods
MqttConnectorConnectionIdentifierAdapter acquireConnection(MqttConnectorConnectionKey key)
void destroyConnection(MqttConnectorConnectionKey key, MqttConnectorConnectionIdentifierAdapter connection)
String getBrokerServerUri()
Retrieves brokerServerUri
boolean getCleanSession()
Retrieves cleanSession
String getClientId()
Retrieves clientId
PoolingProfile getConnectionPoolingProfile()
Retrieves connectionPoolingProfile
int getConnectionTimeout()
Retrieves connectionTimeout
MqttConnectorConnectionKey getDefaultConnectionKey()
Retrieve the default connection key
String getDevkitBuild()
Returns the build of the DevKit used to create this module
String getDevkitVersion()
Returns the version of the DevKit used to create this module
FlowConstruct getFlowConstruct()
Retrieves flowConstruct
int getKeepAliveInterval()
Retrieves keepAliveInterval
String getLwtMessage()
Retrieves lwtMessage
int getLwtQos()
Retrieves lwtQos
boolean getLwtRetained()
Retrieves lwtRetained
String getLwtTopicName()
Retrieves lwtTopicName
String getModuleName()
Returns the user-friendly name of this module
String getModuleVersion()
Returns the version of this module
MuleContext getMuleContext()
Retrieves muleContext
String getPassword()
Retrieves password
String getPersistenceLocation()
Retrieves persistenceLocation
<P> ProcessTemplate<P, MqttConnectorConnectionIdentifierAdapter> getProcessTemplate()
RetryPolicyTemplate getRetryPolicyTemplate()
Retrieves retryPolicyTemplate
String getUsername()
Retrieves username
void initialise()
boolean isCapableOf(Capability capability)
Returns true if this module implements such capability
void releaseConnection(MqttConnectorConnectionKey key, MqttConnectorConnectionIdentifierAdapter connection)
void setBrokerServerUri(String value)
Sets brokerServerUri
void setCleanSession(boolean value)
Sets cleanSession
void setClientId(String value)
Sets clientId
void setConnectionPoolingProfile(PoolingProfile value)
Sets connectionPoolingProfile
void setConnectionTimeout(int value)
Sets connectionTimeout
void setFlowConstruct(FlowConstruct value)
Sets flowConstruct
void setKeepAliveInterval(int value)
Sets keepAliveInterval
void setLwtMessage(String value)
Sets lwtMessage
void setLwtQos(int value)
Sets lwtQos
void setLwtRetained(boolean value)
Sets lwtRetained
void setLwtTopicName(String value)
Sets lwtTopicName
void setMuleContext(MuleContext value)
Sets muleContext
void setPassword(String value)
Sets password
void setPersistenceLocation(String value)
Sets persistenceLocation
void setRetryPolicyTemplate(RetryPolicyTemplate value)
Sets retryPolicyTemplate
void setUsername(String value)
Sets username
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.mule.api.context.MuleContextAware
From interface org.mule.api.lifecycle.Initialisable
From interface org.mule.modules.mqtt.basic.Capabilities
From interface org.mule.modules.mqtt.basic.MetadataAware
From interface org.mule.modules.mqtt.connection.ConnectionManager
From interface org.mule.modules.mqtt.process.ProcessAdapter

Constants

private static final String DEVKIT_BUILD

Constant Value: "3.4.0.1555.8df15c1"

private static final String DEVKIT_VERSION

Constant Value: "3.4.0"

private static final String MODULE_NAME

Constant Value: "MQTT"

private static final String MODULE_VERSION

Constant Value: "1.0"

Fields

private String brokerServerUri

private boolean cleanSession

private String clientId

private GenericKeyedObjectPool connectionPool

Connector Pool

protected PoolingProfile connectionPoolingProfile

private int connectionTimeout

protected FlowConstruct flowConstruct

Flow Construct

private int keepAliveInterval

private String lwtMessage

private int lwtQos

private boolean lwtRetained

private String lwtTopicName

protected MuleContext muleContext

Mule Context

private String password

private String persistenceLocation

protected RetryPolicyTemplate retryPolicyTemplate

private String username

Public Constructors

public MqttConnectorConnectionManager ()

Public Methods

public MqttConnectorConnectionIdentifierAdapter acquireConnection (MqttConnectorConnectionKey key)

Parameters
key
Throws
Exception

public void destroyConnection (MqttConnectorConnectionKey key, MqttConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public String getBrokerServerUri ()

Retrieves brokerServerUri

public boolean getCleanSession ()

Retrieves cleanSession

public String getClientId ()

Retrieves clientId

public PoolingProfile getConnectionPoolingProfile ()

Retrieves connectionPoolingProfile

Returns
  • PoolingProfile representing the pooling parameters

public int getConnectionTimeout ()

Retrieves connectionTimeout

public MqttConnectorConnectionKey getDefaultConnectionKey ()

Retrieve the default connection key

Returns
  • The default connection key

public String getDevkitBuild ()

Returns the build of the DevKit used to create this module

public String getDevkitVersion ()

Returns the version of the DevKit used to create this module

public FlowConstruct getFlowConstruct ()

Retrieves flowConstruct

public int getKeepAliveInterval ()

Retrieves keepAliveInterval

public String getLwtMessage ()

Retrieves lwtMessage

public int getLwtQos ()

Retrieves lwtQos

public boolean getLwtRetained ()

Retrieves lwtRetained

public String getLwtTopicName ()

Retrieves lwtTopicName

public String getModuleName ()

Returns the user-friendly name of this module

public String getModuleVersion ()

Returns the version of this module

public MuleContext getMuleContext ()

Retrieves muleContext

public String getPassword ()

Retrieves password

public String getPersistenceLocation ()

Retrieves persistenceLocation

public ProcessTemplate<P, MqttConnectorConnectionIdentifierAdapter> getProcessTemplate ()

public RetryPolicyTemplate getRetryPolicyTemplate ()

Retrieves retryPolicyTemplate

Returns
  • The reconnection strategy

public String getUsername ()

Retrieves username

public void initialise ()

public boolean isCapableOf (Capability capability)

Returns true if this module implements such capability

Parameters
capability The capability to test for
Returns
  • True if it does, false otherwise

public void releaseConnection (MqttConnectorConnectionKey key, MqttConnectorConnectionIdentifierAdapter connection)

Parameters
key
connection
Throws
Exception

public void setBrokerServerUri (String value)

Sets brokerServerUri

Parameters
value Value to set

public void setCleanSession (boolean value)

Sets cleanSession

Parameters
value Value to set

public void setClientId (String value)

Sets clientId

Parameters
value Value to set

public void setConnectionPoolingProfile (PoolingProfile value)

Sets connectionPoolingProfile

Parameters
value Value to set

public void setConnectionTimeout (int value)

Sets connectionTimeout

Parameters
value Value to set

public void setFlowConstruct (FlowConstruct value)

Sets flowConstruct

Parameters
value Value to set

public void setKeepAliveInterval (int value)

Sets keepAliveInterval

Parameters
value Value to set

public void setLwtMessage (String value)

Sets lwtMessage

Parameters
value Value to set

public void setLwtQos (int value)

Sets lwtQos

Parameters
value Value to set

public void setLwtRetained (boolean value)

Sets lwtRetained

Parameters
value Value to set

public void setLwtTopicName (String value)

Sets lwtTopicName

Parameters
value Value to set

public void setMuleContext (MuleContext value)

Sets muleContext

Parameters
value Value to set

public void setPassword (String value)

Sets password

Parameters
value Value to set

public void setPersistenceLocation (String value)

Sets persistenceLocation

Parameters
value Value to set

public void setRetryPolicyTemplate (RetryPolicyTemplate value)

Sets retryPolicyTemplate

Parameters
value Value to set

public void setUsername (String value)

Sets username

Parameters
value Value to set