Skip to content

Commit 96166d9

Browse files
committed
merge bug24009 into default
2 parents ed596e0 + fc46b3c commit 96166d9

File tree

76 files changed

+819
-1006
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+819
-1006
lines changed

codegen.py

Lines changed: 351 additions & 162 deletions
Large diffs are not rendered by default.

src/com/rabbitmq/client/AlreadyClosedException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
* which was already closed
2323
*/
2424
public class AlreadyClosedException extends ShutdownSignalException {
25+
/** Default for suppressing warnings without version check. */
26+
private static final long serialVersionUID = 1L;
27+
2528
public AlreadyClosedException(String s, Object ref)
2629
{
2730
super(true, true, s, ref);

src/com/rabbitmq/client/BasicProperties.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,78 +104,91 @@ public interface BasicProperties {
104104
* Set the contentType field, or null indicating the field is not set
105105
* @param contentType the value to set the field to
106106
*/
107+
@Deprecated
107108
public abstract void setContentType(String contentType);
108109

109110
/**
110111
* Set the contentEncoding field, or null indicating the field is not set
111112
* @param contentEncoding - the value to set the field to
112113
*/
114+
@Deprecated
113115
public abstract void setContentEncoding(String contentEncoding);
114116

115117
/**
116118
* Set the headers table, or null indicating the field is not set
117119
* @param headers a map of table field names and values
118120
*/
121+
@Deprecated
119122
public abstract void setHeaders(Map<String, Object> headers);
120123

121124
/**
122125
* Set the deliveryMode field, or null indicating the field is not set
123126
* @param deliveryMode the value to set the field to
124127
*/
128+
@Deprecated
125129
public abstract void setDeliveryMode(Integer deliveryMode);
126130

127131
/**
128132
* Set the priority field, or null indicating the field is not set
129133
* @param priority the value to set the field to
130134
*/
135+
@Deprecated
131136
public abstract void setPriority(Integer priority);
132137

133138
/**
134139
* Set the correlationId field, or null indicating the field is not set
135140
* @param correlationId the value to set the field to
136141
*/
142+
@Deprecated
137143
public abstract void setCorrelationId(String correlationId);
138144

139145
/**
140146
* Set the replyTo field, or null indicating the field is not set
141147
* @param replyTo the value to set the field to
142148
*/
149+
@Deprecated
143150
public abstract void setReplyTo(String replyTo);
144151

145152
/**
146153
* Set the expiration field, or null indicating the field is not set
147154
* @param expiration the value to set the field to
148155
*/
156+
@Deprecated
149157
public abstract void setExpiration(String expiration);
150158

151159
/**
152160
* Set the messageId field, or null indicating the field is not set
153161
* @param messageId the value to set the field to
154162
*/
163+
@Deprecated
155164
public abstract void setMessageId(String messageId);
156165

157166
/**
158167
* Set the timestamp field, or null indicating the field is not set
159168
* @param timestamp the value to set the field to
160169
*/
170+
@Deprecated
161171
public abstract void setTimestamp(Date timestamp);
162172

163173
/**
164174
* Set the type field, or null indicating the field is not set
165175
* @param type the value to set the field to
166176
*/
177+
@Deprecated
167178
public abstract void setType(String type);
168179

169180
/**
170181
* Set the userId field, or null indicating the field is not set
171182
* @param userId the value to set the field to
172183
*/
184+
@Deprecated
173185
public abstract void setUserId(String userId);
174186

175187
/**
176188
* Set the appId field, or null indicating the field is not set
177189
* @param appId the value to set the field to
178190
*/
191+
@Deprecated
179192
public abstract void setAppId(String appId);
180-
193+
181194
}

src/com/rabbitmq/client/Channel.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,4 +696,19 @@ void basicNack(long deliveryTag, boolean multiple, boolean requeue)
696696
* @return the sequence number of the next message to be published
697697
*/
698698
long getNextPublishSeqNo();
699+
700+
/**
701+
* Asynchronously send a method over this channel.
702+
* @param method method to transmit over this channel.
703+
* @throws IOException Problem transmitting method.
704+
*/
705+
void asyncRpc(Method method) throws IOException;
706+
707+
/**
708+
* Synchronously send a method over this channel.
709+
* @param method method to transmit over this channel.
710+
* @return response to method. Caller should cast as appropriate.
711+
* @throws IOException Problem transmitting method.
712+
*/
713+
Method rpc(Method method) throws IOException;
699714
}

src/com/rabbitmq/client/ConsumerCancelledException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
public class ConsumerCancelledException extends RuntimeException implements
2222
SensibleClone<ConsumerCancelledException> {
2323

24+
/** Default for non-checking. */
25+
private static final long serialVersionUID = 1L;
26+
2427
@Override
2528
public ConsumerCancelledException sensibleClone() {
2629
try {

src/com/rabbitmq/client/ContentHeader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ public interface ContentHeader extends Cloneable {
3838
* A debugging utility - enable properties to be appended to a string buffer for use as trace messages.
3939
* @param buffer a place to append the properties as a string
4040
*/
41-
public void appendPropertyDebugStringTo(StringBuffer buffer);
41+
public void appendPropertyDebugStringTo(StringBuilder buffer);
4242
}

src/com/rabbitmq/client/FileProperties.java

Lines changed: 0 additions & 133 deletions
This file was deleted.

src/com/rabbitmq/client/MessageProperties.java

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// Copyright (c) 2007-2011 VMware, Inc. All rights reserved.
1515
//
1616

17-
1817
package com.rabbitmq.client;
1918

2019
import com.rabbitmq.client.AMQP.BasicProperties;
@@ -25,9 +24,6 @@
2524
* These are intended for use with {@link Channel#basicPublish} and other Channel methods.
2625
*/
2726
public class MessageProperties {
28-
private static final Integer ZERO = 0;
29-
private static final Integer ONE = 1;
30-
private static final Integer TWO = 2;
3127

3228
/** Empty basic properties, with no fields set */
3329
public static final BasicProperties MINIMAL_BASIC =
@@ -37,7 +33,7 @@ public class MessageProperties {
3733
null, null);
3834
/** Empty basic properties, with only deliveryMode set to 2 (persistent) */
3935
public static final BasicProperties MINIMAL_PERSISTENT_BASIC =
40-
new BasicProperties(null, null, null, TWO,
36+
new BasicProperties(null, null, null, 2,
4137
null, null, null, null,
4238
null, null, null, null,
4339
null, null);
@@ -47,8 +43,8 @@ public class MessageProperties {
4743
new BasicProperties("application/octet-stream",
4844
null,
4945
null,
50-
ONE,
51-
ZERO, null, null, null,
46+
1,
47+
0, null, null, null,
5248
null, null, null, null,
5349
null, null);
5450

@@ -57,8 +53,8 @@ public class MessageProperties {
5753
new BasicProperties("application/octet-stream",
5854
null,
5955
null,
60-
TWO,
61-
ZERO, null, null, null,
56+
2,
57+
0, null, null, null,
6258
null, null, null, null,
6359
null, null);
6460

@@ -67,8 +63,8 @@ public class MessageProperties {
6763
new BasicProperties("text/plain",
6864
null,
6965
null,
70-
ONE,
71-
ZERO, null, null, null,
66+
1,
67+
0, null, null, null,
7268
null, null, null, null,
7369
null, null);
7470

@@ -77,8 +73,8 @@ public class MessageProperties {
7773
new BasicProperties("text/plain",
7874
null,
7975
null,
80-
TWO,
81-
ZERO, null, null, null,
76+
2,
77+
0, null, null, null,
8278
null, null, null, null,
8379
null, null);
8480
}

src/com/rabbitmq/client/PossibleAuthenticationFailureException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
*/
2424
public class PossibleAuthenticationFailureException extends IOException
2525
{
26+
/** Default for non-checking. */
27+
private static final long serialVersionUID = 1L;
28+
2629
public PossibleAuthenticationFailureException(Throwable cause)
2730
{
2831
super("Possibly caused by authentication failure");

src/com/rabbitmq/client/ProtocolVersionMismatchException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import com.rabbitmq.client.impl.Version;
2020

21-
import java.io.IOException;
2221
import java.net.ProtocolException;
2322

2423
/**
@@ -27,6 +26,8 @@
2726
*/
2827
public class ProtocolVersionMismatchException extends ProtocolException
2928
{
29+
/** Default serialVersionUID for serializability without version checking. */
30+
private static final long serialVersionUID = 1L;
3031
private Version clientVersion;
3132
private Version serverVersion;
3233

0 commit comments

Comments
 (0)