Skip to content

Commit 4ceea12

Browse files
committed
Start writing Javadoc
1 parent 7b3f548 commit 4ceea12

File tree

7 files changed

+375
-2
lines changed

7 files changed

+375
-2
lines changed

src/main/java/com/rabbitmq/client/amqp/AddressSelector.java

+7
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,14 @@
1919

2020
import java.util.List;
2121

22+
/** Contract to pick an {@link Address} to connect to a cluster node. */
2223
public interface AddressSelector {
2324

25+
/**
26+
* Pick an address from a list.
27+
*
28+
* @param addresses list of addresses
29+
* @return the address to connect to
30+
*/
2431
Address select(List<Address> addresses);
2532
}

src/main/java/com/rabbitmq/client/amqp/Connection.java

+27
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,45 @@
1919

2020
import java.io.Closeable;
2121

22+
/** A connection to the broker. */
2223
public interface Connection extends Closeable, Resource {
2324

25+
/**
26+
* The {@link Management} instance of this connection.
27+
*
28+
* @return management instance
29+
*/
2430
Management management();
2531

32+
/**
33+
* Create a builder to configure and create a {@link Publisher}.
34+
*
35+
* @return publisher builder
36+
*/
2637
PublisherBuilder publisherBuilder();
2738

39+
/**
40+
* Create a builder to configure and create a {@link Consumer}.
41+
*
42+
* @return consumer builder
43+
*/
2844
ConsumerBuilder consumerBuilder();
2945

46+
/**
47+
* Create a builder to configure and create a {@link RpcClientBuilder}.
48+
*
49+
* @return RPC client builder
50+
*/
3051
RpcClientBuilder rpcClientBuilder();
3152

53+
/**
54+
* Create a builder to configure and create a {@link RpcServerBuilder}.
55+
*
56+
* @return RPC server builder
57+
*/
3258
RpcServerBuilder rpcServerBuilder();
3359

60+
/** Close the connection and its resources */
3461
@Override
3562
void close();
3663
}

src/main/java/com/rabbitmq/client/amqp/ConnectionBuilder.java

+48
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,70 @@
1717
// info@rabbitmq.com.
1818
package com.rabbitmq.client.amqp;
1919

20+
/** Builder for {@link Connection} instances. */
2021
public interface ConnectionBuilder extends ConnectionSettings<ConnectionBuilder> {
2122

23+
/**
24+
* Configuration for recovery.
25+
*
26+
* @return recovery configuration
27+
*/
2228
RecoveryConfiguration recovery();
2329

30+
/**
31+
* Add {@link com.rabbitmq.client.amqp.Resource.StateListener}s to the connection.
32+
*
33+
* @param listeners
34+
* @return this builder instance
35+
*/
2436
ConnectionBuilder listeners(Resource.StateListener... listeners);
2537

38+
/**
39+
* Create the connection instance.
40+
*
41+
* @return the configured connection
42+
*/
2643
Connection build();
2744

45+
/** Configuration for recovery. */
2846
interface RecoveryConfiguration {
2947

48+
/**
49+
* Whether to activate recovery or not.
50+
*
51+
* <p>Activated by default.
52+
*
53+
* @param activated activation flag
54+
* @return the configuration instance
55+
*/
3056
RecoveryConfiguration activated(boolean activated);
3157

58+
/**
59+
* Delay policy for connection attempts.
60+
*
61+
* @param backOffDelayPolicy back-off delay policy
62+
* @return the configuration instance
63+
*/
3264
RecoveryConfiguration backOffDelayPolicy(BackOffDelayPolicy backOffDelayPolicy);
3365

66+
/**
67+
* Whether to activate topology recovery or not.
68+
*
69+
* <p>Topology recovery includes recovery of exchanges, queues, bindings, publishers, and
70+
* consumers.
71+
*
72+
* <p>Activated by default.
73+
*
74+
* @param activated activation flag
75+
* @return the configuration instance
76+
*/
3477
RecoveryConfiguration topology(boolean activated);
3578

79+
/**
80+
* The connection builder.
81+
*
82+
* @return connection builder
83+
*/
3684
ConnectionBuilder connectionBuilder();
3785
}
3886
}

0 commit comments

Comments
 (0)