@@ -60,8 +60,15 @@ public interface Mqtt5BlockingClient extends Mqtt5Client {
6060 *
6161 * @param connect the Connect message sent to the broker.
6262 * @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
6368 * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5ConnAckException wrapping the ConnAck message if it contains
6469 * an Error Code.
70+ * @throws com.hivemq.client.mqtt.exceptions.MqttClientStateException if the client is already connecting or
71+ * connected
6572 */
6673 @ NotNull Mqtt5ConnAck connect (@ NotNull Mqtt5Connect connect );
6774
@@ -153,10 +160,20 @@ public interface Mqtt5BlockingClient extends Mqtt5Client {
153160 * @param publish the Publish message sent to the broker.
154161 * @return the {@link Mqtt5PublishResult} if the Publish message was successfully published (no acknowledgement
155162 * 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 for QoS 1 if the PubAck message contained
164+ * an error code (the PubAck message is
165+ * contained in the exception)
166+ * @throws com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5PubRecException for QoS 2 if the PubRec message contained
167+ * an error code (the PubRec message is
168+ * contained in the exception)
169+ * @throws com.hivemq.client.mqtt.exceptions.ConnectionClosedException for QoS 0 if the connection was closed
170+ * during writing the message to the
171+ * transport
172+ * @throws com.hivemq.client.mqtt.exceptions.MqttSessionExpiredException if the session expired before the message
173+ * has been acknowledged completely
174+ * @throws com.hivemq.client.mqtt.exceptions.MqttEncodeException if the maximum packet size was exceeded
175+ * @throws com.hivemq.client.mqtt.exceptions.MqttClientStateException if the client is not connected and also not
176+ * reconnecting
160177 */
161178 @ NotNull Mqtt5PublishResult publish (@ NotNull Mqtt5Publish publish );
162179
0 commit comments