33 *
44 * All rights reserved. This program and the accompanying materials
55 * are made available under the terms of the Eclipse Public License v1.0
6- * and Eclipse Distribution License v1.0 which accompany this distribution.
6+ * and Eclipse Distribution License v1.0 which accompany this distribution.
77 *
8- * The Eclipse Public License is available at
8+ * The Eclipse Public License is available at
99 * http://www.eclipse.org/legal/epl-v10.html
10- * and the Eclipse Distribution License is available at
10+ * and the Eclipse Distribution License is available at
1111 * http://www.eclipse.org/org/documents/edl-v10.php.
1212 *
1313 * Contributors:
3232 *
3333 * <p>This class implements the blocking {@link IMqttClient} client interface where all
3434 * actions block until they have completed (or timed out).
35- * This implementation is compatible with all Java SE runtimes from 1.4.2 and up.
35+ * This implementation is compatible with all Java SE runtimes from 1.7 and up.
3636 * </p>
3737 * <p>An application can connect to an MQTT server using:</p>
3838 * <ul>
3939 * <li>A plain TCP socket
4040 * <li>An secure SSL/TLS socket
4141 * </ul>
42- *
42+ *
4343 * <p>To enable messages to be delivered even across network and client restarts
4444 * messages need to be safely stored until the message has been delivered at the requested
4545 * quality of service. A pluggable persistence mechanism is provided to store the messages.
@@ -331,7 +331,7 @@ public void connect() throws MqttSecurityException, MqttException {
331331 public void connect (MqttConnectOptions options ) throws MqttSecurityException , MqttException {
332332 aClient .connect (options , null , null ).waitForCompletion (getTimeToWait ());
333333 }
334-
334+
335335 /*
336336 * @see IMqttClient#connect(MqttConnectOptions)
337337 */
@@ -357,7 +357,7 @@ public void disconnect(long quiesceTimeout) throws MqttException {
357357
358358 /*
359359 * (non-Javadoc)
360- *
360+ *
361361 * @see org.eclipse.paho.client.mqttv3.IMqttAsyncClient#disconnectForcibly()
362362 */
363363 public void disconnectForcibly () throws MqttException {
@@ -366,7 +366,7 @@ public void disconnectForcibly() throws MqttException {
366366
367367 /*
368368 * (non-Javadoc)
369- *
369+ *
370370 * @see org.eclipse.paho.client.mqttv3.IMqttAsyncClient#disconnectForcibly(long)
371371 */
372372 public void disconnectForcibly (long disconnectTimeout ) throws MqttException {
@@ -375,7 +375,7 @@ public void disconnectForcibly(long disconnectTimeout) throws MqttException {
375375
376376 /*
377377 * (non-Javadoc)
378- *
378+ *
379379 * @see org.eclipse.paho.client.mqttv3.IMqttAsyncClient#disconnectForcibly(long, long)
380380 */
381381 public void disconnectForcibly (long quiesceTimeout , long disconnectTimeout ) throws MqttException {
@@ -387,7 +387,7 @@ public void disconnectForcibly(long quiesceTimeout, long disconnectTimeout) thro
387387 * <p>
388388 * Because the client is able to establish the TCP/IP connection to a none MQTT server and it will certainly fail to
389389 * send the disconnect packet.
390- *
390+ *
391391 * @param quiesceTimeout the amount of time in milliseconds to allow for existing work to finish before
392392 * disconnecting. A value of zero or less means the client will not quiesce.
393393 * @param disconnectTimeout the amount of time in milliseconds to allow send disconnect packet to server.
@@ -437,14 +437,14 @@ public void subscribe(String[] topicFilters, int[] qos) throws MqttException {
437437 throw new MqttException (MqttException .REASON_CODE_SUBSCRIBE_FAILED );
438438 }
439439 }
440-
440+
441441 /* (non-Javadoc)
442442 * @see org.eclipse.paho.client.mqttv3.IMqttClient#subscribe(java.lang.String, int, java.lang.Object, org.eclipse.paho.client.mqttv3.IMqttActionListener)
443443 */
444444 public void subscribe (String topicFilter , IMqttMessageListener messageListener ) throws MqttException {
445445 this .subscribe (new String [] {topicFilter }, new int [] {1 }, new IMqttMessageListener [] {messageListener });
446446 }
447-
447+
448448 /* (non-Javadoc)
449449 * @see org.eclipse.paho.client.mqttv3.IMqttClient#subscribe(java.lang.String, int, java.lang.Object, org.eclipse.paho.client.mqttv3.IMqttActionListener)
450450 */
@@ -463,23 +463,23 @@ public void subscribe(String topicFilter, int qos, IMqttMessageListener messageL
463463 this .subscribe (new String [] {topicFilter }, new int [] {qos }, new IMqttMessageListener [] {messageListener });
464464 }
465465
466-
467- public void subscribe (String [] topicFilters , int [] qos , IMqttMessageListener [] messageListeners ) throws MqttException {
466+
467+ public void subscribe (String [] topicFilters , int [] qos , IMqttMessageListener [] messageListeners ) throws MqttException {
468468 this .subscribe (topicFilters , qos );
469-
469+
470470 // add message handlers to the list for this client
471471 for (int i = 0 ; i < topicFilters .length ; ++i ) {
472472 aClient .comms .setMessageListener (topicFilters [i ], messageListeners [i ]);
473473 }
474474 }
475-
475+
476476 /*
477477 * @see IMqttClient#subscribeWithResponse(String)
478478 */
479479 public IMqttToken subscribeWithResponse (String topicFilter ) throws MqttException {
480480 return this .subscribeWithResponse (new String [] {topicFilter }, new int [] {1 });
481481 }
482-
482+
483483 /*
484484 * @see IMqttClient#subscribeWithResponse(String, IMqttMessageListener)
485485 */
@@ -540,7 +540,7 @@ public IMqttToken subscribeWithResponse(String[] topicFilters, int[] qos) throws
540540 public IMqttToken subscribeWithResponse (String [] topicFilters , int [] qos , IMqttMessageListener [] messageListeners )
541541 throws MqttException {
542542 IMqttToken tok = this .subscribeWithResponse (topicFilters , qos );
543-
543+
544544 // add message handlers to the list for this client
545545 for (int i = 0 ; i < topicFilters .length ; ++i ) {
546546 aClient .comms .setMessageListener (topicFilters [i ], messageListeners [i ]);
@@ -645,16 +645,16 @@ public IMqttDeliveryToken[] getPendingDeliveryTokens() {
645645 public String getServerURI () {
646646 return aClient .getServerURI ();
647647 }
648-
648+
649649 /**
650650 * Returns the currently connected Server URI
651651 * Implemented due to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=481097
652- *
652+ *
653653 * Where getServerURI only returns the URI that was provided in
654654 * MqttAsyncClient's constructor, getCurrentServerURI returns the URI of the
655655 * Server that the client is currently connected to. This would be different in scenarios
656656 * where multiple server URIs have been provided to the MqttConnectOptions.
657- *
657+ *
658658 * @return the currently connected server URI
659659 */
660660 public String getCurrentServerURI (){
@@ -681,14 +681,14 @@ public boolean isConnected() {
681681 public void setCallback (MqttCallback callback ) {
682682 aClient .setCallback (callback );
683683 }
684-
684+
685685 /* (non-Javadoc)
686686 * @see org.eclipse.paho.client.mqttv3.IMqttClient#setCallback(org.eclipse.paho.client.mqttv3.MqttCallback)
687687 */
688688 public void setManualAcks (boolean manualAcks ) {
689689 aClient .setManualAcks (manualAcks );
690690 }
691-
691+
692692 public void messageArrivedComplete (int messageId , int qos ) throws MqttException {
693693 aClient .messageArrivedComplete (messageId , qos );
694694 }
@@ -705,7 +705,7 @@ public void messageArrivedComplete(int messageId, int qos) throws MqttException
705705 public static String generateClientId () {
706706 return MqttAsyncClient .generateClientId ();
707707 }
708-
708+
709709 /**
710710 * Will attempt to reconnect to the server after the client has lost connection.
711711 * @throws MqttException if an error occurs attempting to reconnect
@@ -721,5 +721,5 @@ public void reconnect() throws MqttException {
721721 public Debug getDebug () {
722722 return (aClient .getDebug ());
723723 }
724-
724+
725725}
0 commit comments