diff --git a/src/main/java/cool/mqtt/hooks/MqttBrokerConfig.java b/src/main/java/cool/mqtt/hooks/MqttBrokerConfig.java index 391a8e8..cf95046 100644 --- a/src/main/java/cool/mqtt/hooks/MqttBrokerConfig.java +++ b/src/main/java/cool/mqtt/hooks/MqttBrokerConfig.java @@ -1,22 +1,20 @@ package cool.mqtt.hooks; /** - * An encapsulation of the MQTT broker configuration corresponding to the - * connection alias provided by a client on connection establishment with - * MQTT.Cool. - *
- * The Hook is expected to supply an instance of {@code MqttBrokerConfig} - * (through an invocation of {@link MQTTCoolHook#resolveAlias(String)}) if no - * static entries have been provided in the + * An encapsulation of the MQTT broker configuration corresponding to the connection alias provided + * by a client on connection establishment with MQTT.Cool. + * + *
The Hook is expected to supply an instance of {@code MqttBrokerConfig} (through an invocation + * of {@link MQTTCoolHook#resolveAlias(String)}) if no static entries have been provided in the * mqtt_master_connector_conf.xml file for a given connection alias. - *
- * The configuration is made up of: + * + *
The configuration is made up of: *
- * The address must be specified in one of the following URI forms: + * + *
The address must be specified in one of the following URI forms: *
- * If the clients want to share a single connection, MQTT.Cool - * concatenates the ClientId prefix with a randomly generated suffix in - * order to make a unique ClientId for opening the physical connection to - * the MQTT broker. Uniqueness of the ClientId is mandatory as multiple + * + *
If the clients want to share a single connection, MQTT.Cool concatenates the ClientId + * prefix with a randomly generated suffix in order to make a unique ClientId for opening the + * physical connection to the MQTT broker. Uniqueness of the ClientId is mandatory as multiple * shared connections may exist for the same MQTT broker. - *
- * In case of blank return value (that is, an empty, whitespace or - * {@code null} string), the default ClientId prefix - * {@code "CLIENT_ID_PREFIX_PLACEHOLDER"} will be used. + * + *
In case of blank return value (that is, an empty, whitespace or {@code null} string), the + * default ClientId prefix {@code "CLIENT_ID_PREFIX_PLACEHOLDER"} will be used. * - * @return the ClientId prefix, or a blank value (as defined above) if the - * default ClientId prefix is accepted + * @return the ClientId prefix, or a blank value (as defined above) if the default ClientId prefix + * is accepted */ String getClientIdPrefix(); /** * Gets the connection timeout expressed in seconds. - *
- * In case of a {@code null} return value, a default value of {@code 5} - * seconds will be used. + * + *
In case of a {@code null} return value, a default value of {@code 5} seconds will be used. * - * @return the connection timeout expressed in seconds, or {@code null} if - * the default value is accepted + * @return the connection timeout expressed in seconds, or {@code null} if the default value is + * accepted */ Integer getConnectionTimeout(); /** * Gets the keep alive interval expressed in seconds. - *
- * In case of a {@code null} return value, a default value of {@code 30} - * seconds will be used. + * + *
In case of a {@code null} return value, a default value of {@code 30} seconds will be used. * - * @return the keep alive interval expressed in seconds, or {@code null} if - * the default value is accepted + * @return the keep alive interval expressed in seconds, or {@code null} if the default value is + * accepted */ Integer getKeepAlive(); /** * Gets the {@code username} for authenticating with the MQTT broker. - *
- * If the MQTT broker does not require authentication, this method should - * return a {@code null} value. Empty or blank values will be provided as - * is in the CONNECT Control Packet built to connect to the - * broker. - *
- * Note that the {@code username} which may be provided by the client will - * take precedence over the one returned by this method. + * + *
If the MQTT broker does not require authentication, this method should return a {@code null} + * value. Empty or blank values will be provided as is in the CONNECT Control + * Packet built to connect to the broker. + * + *
Note that the {@code username} which may be provided by the client will take precedence over + * the one returned by this method. * * @return the {@code username} or {@code null} if no credential is provided * @see MqttConnectOptions#getUsername() @@ -96,29 +88,26 @@ public interface MqttBrokerConfig { /** * Gets the {@code password} for authenticating with the MQTT broker. - *
- * As for {@link #getUsername()}, this method should returns {@code null} - * value in the case of unauthenticated access. Empty or blank values will - * be provided as is in the CONNECT Control Packet built to - * connect to the broker. - *
- * Note that the {@code password} which may be provided by the client will - * take precedence over the one returned by this method. + * + *
As for {@link #getUsername()}, this method should returns {@code null} value in the case of + * unauthenticated access. Empty or blank values will be provided as is in the + * CONNECT Control Packet built to connect to the broker. + * + *
Note that the {@code password} which may be provided by the client will take precedence over + * the one returned by this method. * - * @return the {@code password}, or {@code null} if no credential is - * provided + * @return the {@code password}, or {@code null} if no credential is provided * @see MqttConnectOptions#getPassword() */ String getPassword(); /** * Gets the {@code Will Message} to be stored by the MQTT broker. - *
- * Note that the {@code Will Message} which may be provided by the client - * will take precedence over the one returned by this method. + * + *
Note that the {@code Will Message} which may be provided by the client will take precedence + * over the one returned by this method. * - * @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} * @see MqttConnectOptions#getWillMessage() */ MqttMessage getWillMessage();