Skip to content

Commit eb17047

Browse files
author
Simon MacMullen
committed
Merged bug 22922 into default
2 parents d42c17b + ce1578a commit eb17047

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

docs/wikipages/data.ApiOverview.txt

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,24 +119,21 @@ The following code connects to an AMQP broker:
119119

120120
@code java
121121
ConnectionFactory factory = new ConnectionFactory();
122-
IProtocol protocol = Protocols.FromEnvironment();
123-
IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
124-
125-
The default parameters are:
122+
factory.UserName = user;
123+
factory.Password = pass;
124+
factory.VirtualHost = vhost;
125+
factory.Protocol = Protocols.FromEnvironment();
126+
factory.HostName = hostName;
127+
factory.Port = AmqpTcpEndpoint.UseDefaultPort;
128+
IConnection conn = factory.CreateConnection();
129+
130+
All factory properties have default values. The default value for a property will be used if the property remains unassigned prior to creating a connection:
126131
- username: [code "guest"]
127132
- password: [code "guest"]
128133
- virtual-host: [code "/"]
129-
130-
For control over the username, password and virtual-host supplied to
131-
the broker, modify the [code ConnectionFactory]'s [code
132-
ConnectionParameters] object before calling [code CreateConnection]:
133-
134-
@code java
135-
ConnectionParameters params = factory.Parameters;
136-
params.UserName = userName;
137-
params.Password = password;
138-
params.VirtualHost = virtualHost;
139-
IConnection conn = factory.CreateConnection(protocol, hostName, portNumber);
134+
- protocol: [code AMQP 0.8]
135+
- hostname: [code localhost]
136+
- port: [code 5672]
140137

141138
The IConnection interface can then be used to open a channel:
142139

docs/wikipages/meta.ApiOverview.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
owner:
2-
timestamp: Thu, 24 Jan 2008 17:47:23 GMT
2+
timestamp: Mon, 05 Jul 2010 13:15:32 GMT
33
author:
44
editgroup:
55
viewgroup:

0 commit comments

Comments
 (0)