@@ -530,16 +530,19 @@ public void useSslProtocol(SSLContext context)
530
530
}
531
531
532
532
/**
533
- * Returns true if automatic connection recovery is enabled, false otherwise
533
+ * Returns true if <a href="http://www.rabbitmq.com/api-guide.html#recovery">automatic connection recovery</a>
534
+ * is enabled, false otherwise
534
535
* @return true if automatic connection recovery is enabled, false otherwise
536
+ * @see <a href="http://www.rabbitmq.com/api-guide.html#recovery">Automatic Recovery</a>
535
537
*/
536
538
public boolean isAutomaticRecoveryEnabled () {
537
539
return automaticRecovery ;
538
540
}
539
541
540
542
/**
541
- * Enables or disables automatic connection recovery
543
+ * Enables or disables <a href="http://www.rabbitmq.com/api-guide.html#recovery"> automatic connection recovery</a>.
542
544
* @param automaticRecovery if true, enables connection recovery
545
+ * @see <a href="http://www.rabbitmq.com/api-guide.html#recovery">Automatic Recovery</a>
543
546
*/
544
547
public void setAutomaticRecoveryEnabled (boolean automaticRecovery ) {
545
548
this .automaticRecovery = automaticRecovery ;
@@ -548,6 +551,7 @@ public void setAutomaticRecoveryEnabled(boolean automaticRecovery) {
548
551
/**
549
552
* Returns true if topology recovery is enabled, false otherwise
550
553
* @return true if topology recovery is enabled, false otherwise
554
+ * @see <a href="http://www.rabbitmq.com/api-guide.html#recovery">Automatic Recovery</a>
551
555
*/
552
556
@ SuppressWarnings ("unused" )
553
557
public boolean isTopologyRecoveryEnabled () {
@@ -557,6 +561,7 @@ public boolean isTopologyRecoveryEnabled() {
557
561
/**
558
562
* Enables or disables topology recovery
559
563
* @param topologyRecovery if true, enables topology recovery
564
+ * @see <a href="http://www.rabbitmq.com/api-guide.html#recovery">Automatic Recovery</a>
560
565
*/
561
566
public void setTopologyRecoveryEnabled (boolean topologyRecovery ) {
562
567
this .topologyRecovery = topologyRecovery ;
@@ -567,7 +572,13 @@ protected FrameHandlerFactory createFrameHandlerFactory() throws IOException {
567
572
}
568
573
569
574
/**
570
- * Create a new broker connection
575
+ * Create a new broker connection, picking the first available address from
576
+ * the list.
577
+ *
578
+ * If <a href="http://www.rabbitmq.com/api-guide.html#recovery">automatic connection recovery</a>
579
+ * is enabled, the connection returned by this method will be {@link Recoverable}. Future
580
+ * reconnection attempts will pick a random accessible address from the provided list.
581
+ *
571
582
* @param addrs an array of known broker addresses (hostname/port pairs) to try in order
572
583
* @return an interface to the connection
573
584
* @throws IOException if it encounters a problem
@@ -577,11 +588,18 @@ public Connection newConnection(Address[] addrs) throws IOException {
577
588
}
578
589
579
590
/**
580
- * Create a new broker connection
591
+ * Create a new broker connection, picking the first available address from
592
+ * the list.
593
+ *
594
+ * If <a href="http://www.rabbitmq.com/api-guide.html#recovery">automatic connection recovery</a>
595
+ * is enabled, the connection returned by this method will be {@link Recoverable}. Future
596
+ * reconnection attempts will pick a random accessible address from the provided list.
597
+ *
581
598
* @param executor thread execution service for consumers on the connection
582
599
* @param addrs an array of known broker addresses (hostname/port pairs) to try in order
583
600
* @return an interface to the connection
584
601
* @throws java.io.IOException if it encounters a problem
602
+ * @see <a href="http://www.rabbitmq.com/api-guide.html#recovery">Automatic Recovery</a>
585
603
*/
586
604
public Connection newConnection (ExecutorService executor , Address [] addrs )
587
605
throws IOException
@@ -617,7 +635,12 @@ public ConnectionParams params(ExecutorService executor) {
617
635
}
618
636
619
637
/**
620
- * Create a new broker connection
638
+ * Create a new broker connection.
639
+ *
640
+ * If <a href="http://www.rabbitmq.com/api-guide.html#recovery">automatic connection recovery</a>
641
+ * is enabled, the connection returned by this method will be {@link Recoverable}. Reconnection
642
+ * attempts will always use the address configured on {@link ConnectionFactory}.
643
+ *
621
644
* @return an interface to the connection
622
645
* @throws IOException if it encounters a problem
623
646
*/
@@ -628,7 +651,12 @@ public Connection newConnection() throws IOException {
628
651
}
629
652
630
653
/**
631
- * Create a new broker connection
654
+ * Create a new broker connection.
655
+ *
656
+ * If <a href="http://www.rabbitmq.com/api-guide.html#recovery">automatic connection recovery</a>
657
+ * is enabled, the connection returned by this method will be {@link Recoverable}. Reconnection
658
+ * attempts will always use the address configured on {@link ConnectionFactory}.
659
+ *
632
660
* @param executor thread execution service for consumers on the connection
633
661
* @return an interface to the connection
634
662
* @throws IOException if it encounters a problem
0 commit comments