Skip to content

Commit a627f70

Browse files
author
Vlad Ionescu
committed
merging from default
2 parents 81888d4 + a483289 commit a627f70

27 files changed

+1940
-492
lines changed

Makefile

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ NAME_VSN=${NAME}-${RABBIT_VSN}
33

44
RELEASE_DIR=releases/${NAME}/v${RABBIT_VSN}
55

6-
STAGE_RELEASE_DIR=charlotte:/home/rabbitmq/stage-extras/releases/${NAME}
7-
LIVE_RELEASE_DIR=charlotte:/home/rabbitmq/live-extras/releases/${NAME}
8-
9-
RSYNC_CMD=rsync -irvpl
10-
116
TMPXMLZIP=${NAME_VSN}-tmp-xmldoc.zip
127

138
ifeq "$(RABBIT_VSN)" ""
@@ -18,11 +13,8 @@ else
1813
rabbit-vsn:
1914
endif
2015

21-
deploy-stage: rabbit-vsn ensure-deliverables ensure-universally-readable
22-
${RSYNC_CMD} --exclude=${TMPXMLZIP} releases/${NAME}/ ${STAGE_RELEASE_DIR}
23-
24-
deploy-live: rabbit-vsn ensure-deliverables ensure-universally-readable
25-
${RSYNC_CMD} --exclude=${TMPXMLZIP} releases/${NAME}/ ${LIVE_RELEASE_DIR}
16+
dist: rabbit-vsn ensure-deliverables ensure-universally-readable
17+
rm -f $(RELEASE_DIR)/$(TMPXMLZIP)
2618

2719
ensure-universally-readable:
2820
chmod -R a+rX releases
@@ -40,7 +32,7 @@ ensure-deliverables: rabbit-vsn
4032
file ${RELEASE_DIR}/${NAME_VSN}-wcf-htmldoc
4133

4234
ensure-prerequisites: rabbit-vsn
43-
dpkg -L htmldoc plotutils transfig graphviz > /dev/null
35+
dpkg -L htmldoc plotutils transfig graphviz docbook-utils > /dev/null
4436

4537
ensure-release-dir: rabbit-vsn
4638
touch ${RELEASE_DIR}/

lib/nunit/nunit-console.exe.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<supportedRuntime version="v1.1.4322" />
3232
<supportedRuntime version="v1.0.3705" />
3333

34-
<requiredRuntime version="v1.0.3705" />
34+
<requiredRuntime version="v2.0.50727" />
3535
</startup>
3636

3737
<!--

projects/client/Apigen/src/apigen/Apigen.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,14 @@ public void EmitClassProperties(AmqpClass c) {
482482
EmitLine(" public "+maybeOverride+"void Clear"+MangleClass(f.Name)+"() { m_"+MangleMethod(f.Name)+"_present = false; }");
483483
}
484484
}
485+
486+
EmitLine("");
487+
foreach (AmqpField f in c.m_Fields)
488+
{
489+
if (!IsBoolean(f))
490+
EmitLine(" public " + maybeOverride + "bool Is" + MangleClass(f.Name) + "Present() { return m_" + MangleMethod(f.Name) + "_present; }");
491+
}
492+
485493
EmitLine("");
486494
EmitLine(" public "+MangleClass(c.Name)+"Properties() {}");
487495
EmitLine(" public override int ProtocolClassId { get { return "+c.Index+"; } }");

projects/client/RabbitMQ.Client/src/client/api/AmqpTcpEndpoint.cs

Lines changed: 110 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ namespace RabbitMQ.Client
6363
///<summary>Represents a TCP-addressable AMQP peer, including the
6464
///protocol variant to use, and a host name and port
6565
///number.</summary>
66+
///<para>
67+
/// Some of the constructors take, as a convenience, a System.Uri
68+
/// instance representing an AMQP server address. The use of Uri
69+
/// here is not standardised - Uri is simply a convenient
70+
/// container for internet-address-like components. In particular,
71+
/// the Uri "Scheme" property is ignored: only the "Host" and
72+
/// "Port" properties are extracted.
73+
///</para>
6674
public class AmqpTcpEndpoint
6775
{
6876
private IProtocol m_protocol;
@@ -91,15 +99,113 @@ public int Port
9199
set { m_port = value; }
92100
}
93101

102+
103+
private SslOption m_ssl;
104+
///<summary>Retrieve the SSL options for this AmqpTcpEndpoint.
105+
///If not set, null is returned</summary>
106+
public SslOption Ssl
107+
{
108+
get { return m_ssl; }
109+
set { m_ssl = value; }
110+
}
111+
112+
///<summary>Construct an AmqpTcpEndpoint with the given
113+
///IProtocol, hostname, port number and ssl option. If the port
114+
///number is -1, the default port number for the IProtocol
115+
///will be used.</summary>
116+
public AmqpTcpEndpoint(IProtocol protocol, string hostName, int portOrMinusOne, SslOption ssl)
117+
{
118+
m_protocol = protocol;
119+
m_hostName = hostName;
120+
m_port = portOrMinusOne;
121+
m_ssl = ssl;
122+
}
123+
94124
///<summary>Construct an AmqpTcpEndpoint with the given
95125
///IProtocol, hostname, and port number. If the port number is
96126
///-1, the default port number for the IProtocol will be
97127
///used.</summary>
98-
public AmqpTcpEndpoint(IProtocol protocolVariant, string hostname, int portOrMinusOne)
128+
public AmqpTcpEndpoint(IProtocol protocol, string hostName, int portOrMinusOne) :
129+
this(protocol, hostName, portOrMinusOne, new SslOption())
130+
{
131+
}
132+
133+
///<summary>Construct an AmqpTcpEndpoint with the given
134+
///IProtocol and hostname, using the default port for the
135+
///IProtocol.</summary>
136+
public AmqpTcpEndpoint(IProtocol protocol, string hostName) :
137+
this(protocol, hostName, -1)
138+
{
139+
}
140+
141+
///<summary>Construct an AmqpTcpEndpoint with the given
142+
///IProtocol, "localhost" as the hostname, and using the
143+
///default port for the IProtocol.</summary>
144+
public AmqpTcpEndpoint(IProtocol protocol) :
145+
this(protocol, "localhost", -1)
146+
{
147+
}
148+
149+
///<summary>Construct an AmqpTcpEndpoint with the given
150+
///hostname and port number, using the IProtocol from
151+
///Protocols.FromEnvironment(). If the port number is
152+
///-1, the default port number for the IProtocol will be
153+
///used.</summary>
154+
public AmqpTcpEndpoint(string hostName, int portOrMinusOne) :
155+
this(Protocols.FromEnvironment(), hostName, portOrMinusOne)
156+
{
157+
}
158+
159+
///<summary>Construct an AmqpTcpEndpoint with the given
160+
///hostname, using the IProtocol from
161+
///Protocols.FromEnvironment(), and the default port number of
162+
///that IProtocol.</summary>
163+
public AmqpTcpEndpoint(string hostName) :
164+
this(Protocols.FromEnvironment(), hostName)
165+
{
166+
}
167+
168+
///<summary>Construct an AmqpTcpEndpoint with a hostname of
169+
///"localhost", using the IProtocol from
170+
///Protocols.FromEnvironment(), and the default port number of
171+
///that IProtocol.</summary>
172+
public AmqpTcpEndpoint() :
173+
this(Protocols.FromEnvironment())
174+
{
175+
}
176+
177+
///<summary>Construct an AmqpTcpEndpoint with the given
178+
///IProtocol, Uri and ssl options.</summary>
179+
///<remarks>
180+
/// Please see the class overview documentation for
181+
/// information about the Uri format in use.
182+
///</remarks>
183+
public AmqpTcpEndpoint(IProtocol protocol, Uri uri, SslOption ssl) :
184+
this(protocol, uri.Host, uri.Port, ssl)
185+
{
186+
}
187+
188+
///<summary>Construct an AmqpTcpEndpoint with the given
189+
///IProtocol and Uri.</summary>
190+
///<remarks>
191+
/// Please see the class overview documentation for
192+
/// information about the Uri format in use.
193+
///</remarks>
194+
public AmqpTcpEndpoint(IProtocol protocol, Uri uri) :
195+
this(protocol, uri.Host, uri.Port)
196+
{
197+
}
198+
199+
///<summary>Construct an AmqpTcpEndpoint with the given
200+
///Uri, using the IProtocol from
201+
///Protocols.FromEnvironment().</summary>
202+
///<remarks>
203+
/// Please see the class overview documentation for
204+
/// information about the Uri format in use.
205+
///</remarks>
206+
public AmqpTcpEndpoint(Uri uri) :
207+
this(Protocols.FromEnvironment(), uri)
99208
{
100-
m_protocol = protocolVariant;
101-
m_hostName = hostname;
102-
m_port = portOrMinusOne;
103209
}
104210

105211
///<summary>Returns a URI-like string of the form

projects/client/RabbitMQ.Client/src/client/api/ConnectionFactory.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,18 @@ public IConnection CreateConnection(IProtocol version,
259259
string hostName,
260260
int portNumber)
261261
{
262-
return CreateConnection(new AmqpTcpEndpoint[] {
263-
new AmqpTcpEndpoint(version, hostName, portNumber)
264-
});
262+
return CreateConnection(new AmqpTcpEndpoint(version,
263+
hostName,
264+
portNumber,
265+
m_parameters.Ssl));
265266
}
266267

267268
///<summary>Create a connection to the endpoint specified. The
268269
///port used is the default for the protocol.</summary>
269270
///<exception cref="ArgumentException"/>
270271
public IConnection CreateConnection(IProtocol version, string hostName)
271272
{
272-
return CreateConnection(version, hostName, -1);
273+
return CreateConnection(new AmqpTcpEndpoint(version, hostName));
273274
}
274275

275276
///<summary>Create a connection to the endpoint specified.</summary>
@@ -280,7 +281,7 @@ public IConnection CreateConnection(IProtocol version, string hostName)
280281
///<exception cref="ArgumentException"/>
281282
public IConnection CreateConnection(IProtocol version, Uri uri)
282283
{
283-
return CreateConnection(version, uri.Host, uri.Port);
284+
return CreateConnection(new AmqpTcpEndpoint(version, uri));
284285
}
285286

286287
///<summary>Create a connection to the endpoint specified,
@@ -292,7 +293,7 @@ public IConnection CreateConnection(IProtocol version, Uri uri)
292293
///</remarks>
293294
public IConnection CreateConnection(Uri uri)
294295
{
295-
return CreateConnection(Protocols.FromEnvironment(), uri.Host, uri.Port);
296+
return CreateConnection(new AmqpTcpEndpoint(uri));
296297
}
297298

298299
///<summary>Create a connection to the host (and optional

projects/client/RabbitMQ.Client/src/client/api/ConnectionParameters.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,16 @@ public class ConnectionParameters : ICloneable
8080
public const uint DefaultFrameMax = 0; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
8181

8282
/// <summary>Default value for desired heartbeat interval, in
83-
/// seconds, with zero meaning none (value: 3)</summary>
84-
public const ushort DefaultHeartbeat = 3; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
83+
/// seconds, with zero meaning none (value: 0)</summary>
84+
public const ushort DefaultHeartbeat = 0; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
8585

8686
private string m_userName = DefaultUser;
8787
private string m_password = DefaultPass;
8888
private string m_virtualHost = DefaultVHost;
8989
private ushort m_requestedChannelMax = DefaultChannelMax;
9090
private uint m_requestedFrameMax = DefaultFrameMax;
9191
private ushort m_requestedHeartbeat = DefaultHeartbeat;
92+
private SslOption m_ssl = new SslOption();
9293

9394
///<summary>Construct a fresh instance, with all fields set to
9495
///their respective defaults.</summary>
@@ -136,6 +137,13 @@ public ushort RequestedHeartbeat
136137
set { m_requestedHeartbeat = value; }
137138
}
138139

140+
///<summary>Ssl options setting</summary>
141+
public SslOption Ssl
142+
{
143+
get { return m_ssl; }
144+
set { m_ssl = value; }
145+
}
146+
139147
///<summary>Implement ICloneable.Clone by delegating to our type-safe variant.</summary>
140148
object ICloneable.Clone()
141149
{

projects/client/RabbitMQ.Client/src/client/api/IBasicProperties.cs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,48 @@ public interface IBasicProperties : IContentHeader
162162
///<summary> Clear the ClusterId property. </summary>
163163
void ClearClusterId();
164164

165+
///<summary> Returns true iff the ContentType property is present. </summary>
166+
bool IsContentTypePresent();
167+
168+
///<summary> Returns true iff the ContentEncoding property is present. </summary>
169+
bool IsContentEncodingPresent();
170+
171+
///<summary> Returns true iff the Headers property is present. </summary>
172+
bool IsHeadersPresent();
173+
174+
///<summary> Returns true iff the DeliveryMode property is present. </summary>
175+
bool IsDeliveryModePresent();
176+
177+
///<summary> Returns true iff the Priority property is present. </summary>
178+
bool IsPriorityPresent();
179+
180+
///<summary> Returns true iff the CorrelationId property is present. </summary>
181+
bool IsCorrelationIdPresent();
182+
183+
///<summary> Returns true iff the ReplyTo property is present. </summary>
184+
bool IsReplyToPresent();
185+
186+
///<summary> Returns true iff the Expiration property is present. </summary>
187+
bool IsExpirationPresent();
188+
189+
///<summary> Returns true iff the MessageId property is present. </summary>
190+
bool IsMessageIdPresent();
191+
192+
///<summary> Returns true iff the Timestamp property is present. </summary>
193+
bool IsTimestampPresent();
194+
195+
///<summary> Returns true iff the Type property is present. </summary>
196+
bool IsTypePresent();
197+
198+
///<summary> Returns true iff the UserId property is present. </summary>
199+
bool IsUserIdPresent();
200+
201+
///<summary> Returns true iff the AppId property is present. </summary>
202+
bool IsAppIdPresent();
203+
204+
///<summary> Returns true iff the ClusterId property is present. </summary>
205+
bool IsClusterIdPresent();
206+
165207
///<summary>Convenience property; parses ReplyTo property
166208
///using PublicationAddress.Parse, and serializes it using
167209
///PublicationAddress.ToString. Returns null if ReplyTo property

projects/client/RabbitMQ.Client/src/client/api/IContentHeader.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,12 @@
5454
// Contributor(s): ______________________________________.
5555
//
5656
//---------------------------------------------------------------------------
57+
using System;
58+
5759
namespace RabbitMQ.Client
5860
{
5961
///<summary>A decoded AMQP content header frame.</summary>
60-
public interface IContentHeader
62+
public interface IContentHeader : ICloneable
6163
{
6264
///<summary>Retrieve the AMQP class ID of this content header.</summary>
6365
int ProtocolClassId { get; }

projects/client/RabbitMQ.Client/src/client/api/IFileProperties.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,32 @@ public interface IFileProperties : IContentHeader
131131

132132
///<summary> Clear the ClusterId property. </summary>
133133
void ClearClusterId();
134+
135+
///<summary> Returns true iff the ContentType property is present. </summary>
136+
bool IsContentTypePresent();
137+
138+
///<summary> Returns true iff the ContentEncoding property is present. </summary>
139+
bool IsContentEncodingPresent();
140+
141+
///<summary> Returns true iff the Headers property is present. </summary>
142+
bool IsHeadersPresent();
143+
144+
///<summary> Returns true iff the Priority property is present. </summary>
145+
bool IsPriorityPresent();
146+
147+
///<summary> Returns true iff the ReplyTo property is present. </summary>
148+
bool IsReplyToPresent();
149+
150+
///<summary> Returns true iff the MessageId property is present. </summary>
151+
bool IsMessageIdPresent();
152+
153+
///<summary> Returns true iff the Filename property is present. </summary>
154+
bool IsFilenamePresent();
155+
156+
///<summary> Returns true iff the Timestamp property is present. </summary>
157+
bool IsTimestampPresent();
158+
159+
///<summary> Returns true iff the ClusterId property is present. </summary>
160+
bool IsClusterIdPresent();
134161
}
135162
}

projects/client/RabbitMQ.Client/src/client/api/IStreamProperties.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,20 @@ public interface IStreamProperties : IContentHeader
107107

108108
///<summary> Clear the Timestamp property. </summary>
109109
void ClearTimestamp();
110+
111+
///<summary> Returns true iff the ContentType property is present. </summary>
112+
bool IsContentTypePresent();
113+
114+
///<summary> Returns true iff the ContentEncoding property is present. </summary>
115+
bool IsContentEncodingPresent();
116+
117+
///<summary> Returns true iff the Headers property is present. </summary>
118+
bool IsHeadersPresent();
119+
120+
///<summary> Returns true iff the Priority property is present. </summary>
121+
bool IsPriorityPresent();
122+
123+
///<summary> Returns true iff the Timestamp property is present. </summary>
124+
bool IsTimestampPresent();
110125
}
111126
}

0 commit comments

Comments
 (0)