@@ -60,8 +60,15 @@ public interface Mqtt5BlockingClient extends Mqtt5Client {
60
60
*
61
61
* @param connect the Connect message sent to the broker.
62
62
* @return the ConnAck message if it does not contain an Error Code (connected successfully).
63
+ * @throws com.hivemq.client.mqtt.exceptions.ConnectionFailedException if an error occurs before the Connect
64
+ * message could be sent.
65
+ * @throws com.hivemq.client.mqtt.exceptions.ConnectionClosedException if the connection is closed after the
66
+ * Connect message has been sent but before a
67
+ * ConnAck message has been received
63
68
* @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5ConnAckException wrapping the ConnAck message if it contains
64
69
* an Error Code.
70
+ * @throws com.hivemq.client.mqtt.exceptions.MqttClientStateException if the client is already connecting or
71
+ * connected
65
72
*/
66
73
@ NotNull Mqtt5ConnAck connect (@ NotNull Mqtt5Connect connect );
67
74
@@ -153,10 +160,18 @@ public interface Mqtt5BlockingClient extends Mqtt5Client {
153
160
* @param publish the Publish message sent to the broker.
154
161
* @return the {@link Mqtt5PublishResult} if the Publish message was successfully published (no acknowledgement
155
162
* message contains an Error Code, {@link Mqtt5PublishResult#getError()} will always be absent).
156
- * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5PubAckException wrapping the corresponding PubAck message if
157
- * it contains an Error Code.
158
- * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5PubRecException wrapping the corresponding PubRec message if
159
- * it contains an Error Code.
163
+ * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5PubAckException wrapping the corresponding PubAck message
164
+ * if it contains an Error Code.
165
+ * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5PubRecException wrapping the corresponding PubRec message
166
+ * if it contains an Error Code.
167
+ * @throws com.hivemq.client.mqtt.exceptions.ConnectionClosedException for QoS 0 if the connection was closed
168
+ * during writing the message to the
169
+ * transport
170
+ * @throws com.hivemq.client.mqtt.exceptions.MqttSessionExpiredException if the session expired before the message
171
+ * has been acknowledged completely
172
+ * @throws com.hivemq.client.mqtt.exceptions.MqttEncodeException if the maximum packet size was exceeded
173
+ * @throws com.hivemq.client.mqtt.exceptions.MqttClientStateException if the client is not connected and also not
174
+ * reconnecting
160
175
*/
161
176
@ NotNull Mqtt5PublishResult publish (@ NotNull Mqtt5Publish publish );
162
177
0 commit comments