Skip to content

Commit

Permalink
Improve code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfinocchiaro committed Sep 21, 2017
1 parent dce4c24 commit 7efe7a5
Showing 1 changed file with 22 additions and 36 deletions.
58 changes: 22 additions & 36 deletions src/main/java/cool/mqtt/hooks/MqttConnectOptions.java
Original file line number Diff line number Diff line change
@@ -1,47 +1,35 @@
package cool.mqtt.hooks;

/**
* A wrapper of the connection parameters actually used by the MQTT.Cool
* server while establishing the <i>end-to-end</i> connection between the client
* and the target MQTT broker.
* <p>
* The client may specify the following options on its behalf:
* A wrapper of the connection parameters actually used by the MQTT&#46;Cool server while
* establishing the <i>end-to-end</i> connection between the client and the target MQTT broker.
*
* <p>The client may specify the following options on its behalf:
* <ul>
* <li>{@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
* <tt>mqtt_master_connector_conf.xml</tt> or supplied through the
* {@code MqttBrokerConfig} instance returned by an invocation of
* {@link MQTTCoolHook#resolveAlias(String)}.
* </li>
* <li>{@code clean session} flag, which specifies how to handle the Session
* Persistence.</li>
* <li>{@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
* <tt>mqtt_master_connector_conf.xml</tt> or supplied through the
* {@code MqttBrokerConfig} instance returned by an invocation of
* {@link MQTTCoolHook#resolveAlias(String)}.
* </li>
* <li>{@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
* <tt>mqtt_master_connector_conf.xml</tt> or supplied through the {@code MqttBrokerConfig} instance
* returned by an invocation of {@link MQTTCoolHook#resolveAlias(String)}.</li>
* <li>{@code clean session} flag, which specifies how to handle the Session Persistence.</li>
* <li>{@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
* <tt>mqtt_master_connector_conf.xml</tt> or supplied through the {@code MqttBrokerConfig} instance
* returned by an invocation of {@link MQTTCoolHook#resolveAlias(String)}.</li>
* </ul>
*/
public interface MqttConnectOptions {

/**
* Gets the {@code username} to be used for authenticating with the target
* MQTT broker.
* 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
* @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.
* 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
* @return the {@code password}, or {@code null} if no credential is provided
*/
String getPassword();

Expand All @@ -62,18 +50,16 @@ public interface MqttConnectOptions {
/**
* 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,
* otherwise {@code null}
* @return the {@code Will Message} to be stored by the MQTT broker if any, otherwise {@code null}
*/
MqttMessage getWillMessage();

/**
* Gets the <i>clean session</i> flag specified by the client on connection
* establishment.
* Gets the <i>clean session</i> flag specified by the client on connection establishment.
*
* @return {@code true} if the client does not want to make the Session
* persistent, {@code false} otherwise
* @return {@code true} if the client does not want to make the Session persistent, {@code false}
* otherwise
*/
boolean isCleanSession();

}
}

0 comments on commit 7efe7a5

Please sign in to comment.