19
19
import org .springframework .amqp .AmqpException ;
20
20
import org .springframework .amqp .support .converter .MessageConverter ;
21
21
import org .springframework .core .ParameterizedTypeReference ;
22
+ import org .springframework .lang .Nullable ;
22
23
23
24
/**
24
25
* Specifies a basic set of AMQP operations.
@@ -141,6 +142,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
141
142
* @return a message or null if there is none waiting
142
143
* @throws AmqpException if there is a problem
143
144
*/
145
+ @ Nullable
144
146
Message receive () throws AmqpException ;
145
147
146
148
/**
@@ -151,6 +153,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
151
153
* @return a message or null if there is none waiting
152
154
* @throws AmqpException if there is a problem
153
155
*/
156
+ @ Nullable
154
157
Message receive (String queueName ) throws AmqpException ;
155
158
156
159
/**
@@ -164,6 +167,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
164
167
* @throws AmqpException if there is a problem
165
168
* @since 1.6
166
169
*/
170
+ @ Nullable
167
171
Message receive (long timeoutMillis ) throws AmqpException ;
168
172
169
173
/**
@@ -178,6 +182,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
178
182
* @throws AmqpException if there is a problem
179
183
* @since 1.6
180
184
*/
185
+ @ Nullable
181
186
Message receive (String queueName , long timeoutMillis ) throws AmqpException ;
182
187
183
188
// receive methods with conversion
@@ -189,6 +194,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
189
194
* @return a message or null if there is none waiting
190
195
* @throws AmqpException if there is a problem
191
196
*/
197
+ @ Nullable
192
198
Object receiveAndConvert () throws AmqpException ;
193
199
194
200
/**
@@ -199,6 +205,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
199
205
* @return a message or null if there is none waiting
200
206
* @throws AmqpException if there is a problem
201
207
*/
208
+ @ Nullable
202
209
Object receiveAndConvert (String queueName ) throws AmqpException ;
203
210
204
211
/**
@@ -213,6 +220,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
213
220
* @throws AmqpException if there is a problem
214
221
* @since 1.6
215
222
*/
223
+ @ Nullable
216
224
Object receiveAndConvert (long timeoutMillis ) throws AmqpException ;
217
225
218
226
/**
@@ -228,6 +236,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
228
236
* @throws AmqpException if there is a problem
229
237
* @since 1.6
230
238
*/
239
+ @ Nullable
231
240
Object receiveAndConvert (String queueName , long timeoutMillis ) throws AmqpException ;
232
241
233
242
/**
@@ -241,6 +250,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
241
250
* @throws AmqpException if there is a problem.
242
251
* @since 2.0
243
252
*/
253
+ @ Nullable
244
254
<T > T receiveAndConvert (ParameterizedTypeReference <T > type ) throws AmqpException ;
245
255
246
256
/**
@@ -255,6 +265,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
255
265
* @throws AmqpException if there is a problem
256
266
* @since 2.0
257
267
*/
268
+ @ Nullable
258
269
<T > T receiveAndConvert (String queueName , ParameterizedTypeReference <T > type ) throws AmqpException ;
259
270
260
271
/**
@@ -272,6 +283,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
272
283
* @throws AmqpException if there is a problem
273
284
* @since 2.0
274
285
*/
286
+ @ Nullable
275
287
<T > T receiveAndConvert (long timeoutMillis , ParameterizedTypeReference <T > type ) throws AmqpException ;
276
288
277
289
/**
@@ -290,6 +302,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
290
302
* @throws AmqpException if there is a problem
291
303
* @since 2.0
292
304
*/
305
+ @ Nullable
293
306
<T > T receiveAndConvert (String queueName , long timeoutMillis , ParameterizedTypeReference <T > type )
294
307
throws AmqpException ;
295
308
@@ -410,6 +423,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
410
423
* @return the response if there is one
411
424
* @throws AmqpException if there is a problem
412
425
*/
426
+ @ Nullable
413
427
Message sendAndReceive (Message message ) throws AmqpException ;
414
428
415
429
/**
@@ -422,6 +436,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
422
436
* @return the response if there is one
423
437
* @throws AmqpException if there is a problem
424
438
*/
439
+ @ Nullable
425
440
Message sendAndReceive (String routingKey , Message message ) throws AmqpException ;
426
441
427
442
/**
@@ -436,6 +451,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
436
451
* @return the response if there is one
437
452
* @throws AmqpException if there is a problem
438
453
*/
454
+ @ Nullable
439
455
Message sendAndReceive (String exchange , String routingKey , Message message ) throws AmqpException ;
440
456
441
457
// send and receive methods with conversion
@@ -450,6 +466,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
450
466
* @return the response if there is one
451
467
* @throws AmqpException if there is a problem
452
468
*/
469
+ @ Nullable
453
470
Object convertSendAndReceive (Object message ) throws AmqpException ;
454
471
455
472
/**
@@ -463,6 +480,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
463
480
* @return the response if there is one
464
481
* @throws AmqpException if there is a problem
465
482
*/
483
+ @ Nullable
466
484
Object convertSendAndReceive (String routingKey , Object message ) throws AmqpException ;
467
485
468
486
/**
@@ -477,6 +495,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
477
495
* @return the response if there is one
478
496
* @throws AmqpException if there is a problem
479
497
*/
498
+ @ Nullable
480
499
Object convertSendAndReceive (String exchange , String routingKey , Object message ) throws AmqpException ;
481
500
482
501
/**
@@ -490,6 +509,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
490
509
* @return the response if there is one
491
510
* @throws AmqpException if there is a problem
492
511
*/
512
+ @ Nullable
493
513
Object convertSendAndReceive (Object message , MessagePostProcessor messagePostProcessor ) throws AmqpException ;
494
514
495
515
/**
@@ -504,6 +524,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
504
524
* @return the response if there is one
505
525
* @throws AmqpException if there is a problem
506
526
*/
527
+ @ Nullable
507
528
Object convertSendAndReceive (String routingKey , Object message , MessagePostProcessor messagePostProcessor )
508
529
throws AmqpException ;
509
530
@@ -520,6 +541,7 @@ Object convertSendAndReceive(String routingKey, Object message, MessagePostProce
520
541
* @return the response if there is one
521
542
* @throws AmqpException if there is a problem
522
543
*/
544
+ @ Nullable
523
545
Object convertSendAndReceive (String exchange , String routingKey , Object message ,
524
546
MessagePostProcessor messagePostProcessor ) throws AmqpException ;
525
547
@@ -537,6 +559,7 @@ Object convertSendAndReceive(String exchange, String routingKey, Object message,
537
559
* @throws AmqpException if there is a problem.
538
560
* @since 2.0
539
561
*/
562
+ @ Nullable
540
563
<T > T convertSendAndReceiveAsType (Object message , ParameterizedTypeReference <T > responseType )
541
564
throws AmqpException ;
542
565
@@ -554,6 +577,7 @@ <T> T convertSendAndReceiveAsType(Object message, ParameterizedTypeReference<T>
554
577
* @throws AmqpException if there is a problem
555
578
* @since 2.0
556
579
*/
580
+ @ Nullable
557
581
<T > T convertSendAndReceiveAsType (String routingKey , Object message ,
558
582
ParameterizedTypeReference <T > responseType ) throws AmqpException ;
559
583
@@ -572,6 +596,7 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
572
596
* @throws AmqpException if there is a problem
573
597
* @since 2.0
574
598
*/
599
+ @ Nullable
575
600
<T > T convertSendAndReceiveAsType (String exchange , String routingKey , Object message ,
576
601
ParameterizedTypeReference <T > responseType ) throws AmqpException ;
577
602
@@ -589,6 +614,7 @@ <T> T convertSendAndReceiveAsType(String exchange, String routingKey, Object mes
589
614
* @throws AmqpException if there is a problem
590
615
* @since 2.0
591
616
*/
617
+ @ Nullable
592
618
<T > T convertSendAndReceiveAsType (Object message , MessagePostProcessor messagePostProcessor ,
593
619
ParameterizedTypeReference <T > responseType ) throws AmqpException ;
594
620
@@ -607,6 +633,7 @@ <T> T convertSendAndReceiveAsType(Object message, MessagePostProcessor messagePo
607
633
* @throws AmqpException if there is a problem
608
634
* @since 2.0
609
635
*/
636
+ @ Nullable
610
637
<T > T convertSendAndReceiveAsType (String routingKey , Object message ,
611
638
MessagePostProcessor messagePostProcessor , ParameterizedTypeReference <T > responseType )
612
639
throws AmqpException ;
@@ -627,6 +654,7 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
627
654
* @throws AmqpException if there is a problem
628
655
* @since 2.0
629
656
*/
657
+ @ Nullable
630
658
<T > T convertSendAndReceiveAsType (String exchange , String routingKey , Object message ,
631
659
MessagePostProcessor messagePostProcessor , ParameterizedTypeReference <T > responseType )
632
660
throws AmqpException ;
0 commit comments