Skip to content

Commit 380d3ab

Browse files
author
Emile Joubert
committed
Merged bug22913 into default
2 parents f18c6c5 + 2b3f3a9 commit 380d3ab

File tree

4 files changed

+12
-19
lines changed

4 files changed

+12
-19
lines changed

src/com/rabbitmq/client/Connection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
*
4141
* <pre>
4242
* ConnectionFactory factory = new ConnectionFactory();
43-
* factory.setHostName(hostName);
43+
* factory.setHost(hostName);
44+
* factory.setPort(portNumber);
4445
* factory.setVirtualHost(virtualHost);
4546
* factory.setUsername(username);
4647
* factory.setPassword(password);

src/com/rabbitmq/client/ConnectionFactory.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ public int getPort() {
135135
}
136136

137137
/**
138-
* @return the default port to use for connections
138+
* Set the target port.
139+
* @param port the default port to use for connections
139140
*/
140141
public void setPort(int port) {
141142
this.port = port;
@@ -244,7 +245,7 @@ public void setRequestedHeartbeat(int requestedHeartbeat) {
244245
* table. Such changes will take effect when the next new
245246
* connection is started using this factory.
246247
* @return the map of client properties
247-
* @see setClientProperties()
248+
* @see #setClientProperties
248249
*/
249250
public Map<String, Object> getClientProperties() {
250251
return _clientProperties;
@@ -254,7 +255,7 @@ public Map<String, Object> getClientProperties() {
254255
* Replace the table of client properties that will be sent to the
255256
* server during subsequent connection startups.
256257
* @param clientProperties the map of extra client properties
257-
* @see getClientProperties()
258+
* @see #getClientProperties
258259
*/
259260
public void setClientProperties(Map<String, Object> clientProperties) {
260261
_clientProperties = clientProperties;

src/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,8 @@
5454
/**
5555
* Concrete class representing and managing an AMQP connection to a broker.
5656
* <p>
57-
* To connect to a broker,
58-
*
59-
* <pre>
60-
* AMQConnection conn = new AMQConnection(hostName, portNumber);
61-
* conn.open(username, portNumber, virtualHost);
62-
* </pre>
63-
*
64-
* <pre>
65-
* ChannelN ch1 = conn.createChannel(1);
66-
* ch1.open(&quot;&quot;);
67-
* </pre>
57+
* To create a broker connection, use {@link ConnectionFactory}. See {@link Connection}
58+
* for an example.
6859
*/
6960
public class AMQConnection extends ShutdownNotifierComponent implements Connection {
7061
/** Timeout used while waiting for AMQP handshaking to complete (milliseconds) */
@@ -79,7 +70,7 @@ public class AMQConnection extends ShutdownNotifierComponent implements Connecti
7970
* method is called when each new ConnectionFactory instance is
8071
* constructed.
8172
* @return a map of client properties
82-
* @see Connection.getClientProperties()
73+
* @see Connection#getClientProperties
8374
*/
8475
public static Map<String, Object> defaultClientProperties() {
8576
return Frame.buildTable(new Object[] {
@@ -134,7 +125,7 @@ public static Map<String, Object> defaultClientProperties() {
134125

135126
/**
136127
* Protected API - respond, in the driver thread, to a ShutdownSignal.
137-
* @param channelNumber the number of the channel to disconnect
128+
* @param channel the channel to disconnect
138129
*/
139130
public final void disconnectChannel(ChannelN channel) {
140131
_channelManager.disconnectChannel(channel);

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
* To open a channel,
6565
* <pre>
6666
* {@link Connection} conn = ...;
67-
* {@link ChannelN} ch1 = conn.{@link Connection#createChannel createChannel}(1);
68-
* ch1.{@link ChannelN#open open}("");
67+
* {@link ChannelN} ch1 = conn.{@link Connection#createChannel createChannel}();
68+
* ch1.{@link ChannelN#open open}();
6969
* </pre>
7070
*/
7171
public class ChannelN extends AMQChannel implements com.rabbitmq.client.Channel {

0 commit comments

Comments
 (0)