All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cool.mqtt.hooks.MqttConnectOptions Maven / Gradle / Ivy

There is a newer version: 1.3.0
Show newest version
package cool.mqtt.hooks;

/**
 * A wrapper of the connection parameters actually used by the MQTT.Cool server while
 * establishing the end-to-end connection between the client and the target MQTT broker.
 *
 * 

The client may specify the following options on its behalf: *

    *
  • {@code username} and {@code password} used for authenticating the client: if provided, they * will take precedence over the ones which may have been defined in * mqtt_master_connector_conf.xml or supplied through the {@code MqttBrokerConfig} instance * returned by an invocation of {@link MQTTCoolHook#resolveAlias(String)}.
  • *
  • {@code clean session} flag, which specifies how to handle the Session Persistence.
  • *
  • {@code Will Message}, which allows to publish a message in case of connection issues on the * client side; if provided, it will take precedence over the one which may have been defined in * mqtt_master_connector_conf.xml or supplied through the {@code MqttBrokerConfig} instance * returned by an invocation of {@link MQTTCoolHook#resolveAlias(String)}.
  • *
*/ public interface MqttConnectOptions { /** * Gets the {@code username} to be used for authenticating with the target MQTT broker. * * @return the {@code username}, or {@code null} if no credential is provided */ String getUsername(); /** * Gets the {@code password} to be used for authenticating with the target MQTT broker. * * @return the {@code password}, or {@code null} if no credential is provided */ String getPassword(); /** * Gets the connection timeout expressed in seconds. * * @return the connection timeout expressed in seconds */ int getConnectionTimeout(); /** * Gets the keep alive interval expressed in seconds. * * @return the keep alive interval expressed in seconds */ int getKeepAlive(); /** * Gets the {@code Will Message} to be stored by the MQTT broker. * * @return the {@code Will Message} to be stored by the MQTT broker if any, or {@code null} */ MqttMessage getWillMessage(); /** * Gets the clean session flag specified by the client on connection establishment. * * @return {@code true} if the client does not want to make the Session persistent */ boolean isCleanSession(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy