1919import org .springframework .amqp .AmqpException ;
2020import org .springframework .amqp .support .converter .MessageConverter ;
2121import org .springframework .core .ParameterizedTypeReference ;
22+ import org .springframework .lang .Nullable ;
2223
2324/**
2425 * Specifies a basic set of AMQP operations.
@@ -141,6 +142,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
141142 * @return a message or null if there is none waiting
142143 * @throws AmqpException if there is a problem
143144 */
145+ @ Nullable
144146 Message receive () throws AmqpException ;
145147
146148 /**
@@ -151,6 +153,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
151153 * @return a message or null if there is none waiting
152154 * @throws AmqpException if there is a problem
153155 */
156+ @ Nullable
154157 Message receive (String queueName ) throws AmqpException ;
155158
156159 /**
@@ -164,6 +167,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
164167 * @throws AmqpException if there is a problem
165168 * @since 1.6
166169 */
170+ @ Nullable
167171 Message receive (long timeoutMillis ) throws AmqpException ;
168172
169173 /**
@@ -178,6 +182,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
178182 * @throws AmqpException if there is a problem
179183 * @since 1.6
180184 */
185+ @ Nullable
181186 Message receive (String queueName , long timeoutMillis ) throws AmqpException ;
182187
183188 // receive methods with conversion
@@ -189,6 +194,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
189194 * @return a message or null if there is none waiting
190195 * @throws AmqpException if there is a problem
191196 */
197+ @ Nullable
192198 Object receiveAndConvert () throws AmqpException ;
193199
194200 /**
@@ -199,6 +205,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
199205 * @return a message or null if there is none waiting
200206 * @throws AmqpException if there is a problem
201207 */
208+ @ Nullable
202209 Object receiveAndConvert (String queueName ) throws AmqpException ;
203210
204211 /**
@@ -213,6 +220,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
213220 * @throws AmqpException if there is a problem
214221 * @since 1.6
215222 */
223+ @ Nullable
216224 Object receiveAndConvert (long timeoutMillis ) throws AmqpException ;
217225
218226 /**
@@ -228,6 +236,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
228236 * @throws AmqpException if there is a problem
229237 * @since 1.6
230238 */
239+ @ Nullable
231240 Object receiveAndConvert (String queueName , long timeoutMillis ) throws AmqpException ;
232241
233242 /**
@@ -241,6 +250,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
241250 * @throws AmqpException if there is a problem.
242251 * @since 2.0
243252 */
253+ @ Nullable
244254 <T > T receiveAndConvert (ParameterizedTypeReference <T > type ) throws AmqpException ;
245255
246256 /**
@@ -255,6 +265,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
255265 * @throws AmqpException if there is a problem
256266 * @since 2.0
257267 */
268+ @ Nullable
258269 <T > T receiveAndConvert (String queueName , ParameterizedTypeReference <T > type ) throws AmqpException ;
259270
260271 /**
@@ -272,6 +283,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
272283 * @throws AmqpException if there is a problem
273284 * @since 2.0
274285 */
286+ @ Nullable
275287 <T > T receiveAndConvert (long timeoutMillis , ParameterizedTypeReference <T > type ) throws AmqpException ;
276288
277289 /**
@@ -290,6 +302,7 @@ void convertAndSend(String exchange, String routingKey, Object message, MessageP
290302 * @throws AmqpException if there is a problem
291303 * @since 2.0
292304 */
305+ @ Nullable
293306 <T > T receiveAndConvert (String queueName , long timeoutMillis , ParameterizedTypeReference <T > type )
294307 throws AmqpException ;
295308
@@ -410,6 +423,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
410423 * @return the response if there is one
411424 * @throws AmqpException if there is a problem
412425 */
426+ @ Nullable
413427 Message sendAndReceive (Message message ) throws AmqpException ;
414428
415429 /**
@@ -422,6 +436,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
422436 * @return the response if there is one
423437 * @throws AmqpException if there is a problem
424438 */
439+ @ Nullable
425440 Message sendAndReceive (String routingKey , Message message ) throws AmqpException ;
426441
427442 /**
@@ -436,6 +451,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
436451 * @return the response if there is one
437452 * @throws AmqpException if there is a problem
438453 */
454+ @ Nullable
439455 Message sendAndReceive (String exchange , String routingKey , Message message ) throws AmqpException ;
440456
441457 // send and receive methods with conversion
@@ -450,6 +466,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
450466 * @return the response if there is one
451467 * @throws AmqpException if there is a problem
452468 */
469+ @ Nullable
453470 Object convertSendAndReceive (Object message ) throws AmqpException ;
454471
455472 /**
@@ -463,6 +480,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
463480 * @return the response if there is one
464481 * @throws AmqpException if there is a problem
465482 */
483+ @ Nullable
466484 Object convertSendAndReceive (String routingKey , Object message ) throws AmqpException ;
467485
468486 /**
@@ -477,6 +495,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
477495 * @return the response if there is one
478496 * @throws AmqpException if there is a problem
479497 */
498+ @ Nullable
480499 Object convertSendAndReceive (String exchange , String routingKey , Object message ) throws AmqpException ;
481500
482501 /**
@@ -490,6 +509,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
490509 * @return the response if there is one
491510 * @throws AmqpException if there is a problem
492511 */
512+ @ Nullable
493513 Object convertSendAndReceive (Object message , MessagePostProcessor messagePostProcessor ) throws AmqpException ;
494514
495515 /**
@@ -504,6 +524,7 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
504524 * @return the response if there is one
505525 * @throws AmqpException if there is a problem
506526 */
527+ @ Nullable
507528 Object convertSendAndReceive (String routingKey , Object message , MessagePostProcessor messagePostProcessor )
508529 throws AmqpException ;
509530
@@ -520,6 +541,7 @@ Object convertSendAndReceive(String routingKey, Object message, MessagePostProce
520541 * @return the response if there is one
521542 * @throws AmqpException if there is a problem
522543 */
544+ @ Nullable
523545 Object convertSendAndReceive (String exchange , String routingKey , Object message ,
524546 MessagePostProcessor messagePostProcessor ) throws AmqpException ;
525547
@@ -537,6 +559,7 @@ Object convertSendAndReceive(String exchange, String routingKey, Object message,
537559 * @throws AmqpException if there is a problem.
538560 * @since 2.0
539561 */
562+ @ Nullable
540563 <T > T convertSendAndReceiveAsType (Object message , ParameterizedTypeReference <T > responseType )
541564 throws AmqpException ;
542565
@@ -554,6 +577,7 @@ <T> T convertSendAndReceiveAsType(Object message, ParameterizedTypeReference<T>
554577 * @throws AmqpException if there is a problem
555578 * @since 2.0
556579 */
580+ @ Nullable
557581 <T > T convertSendAndReceiveAsType (String routingKey , Object message ,
558582 ParameterizedTypeReference <T > responseType ) throws AmqpException ;
559583
@@ -572,6 +596,7 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
572596 * @throws AmqpException if there is a problem
573597 * @since 2.0
574598 */
599+ @ Nullable
575600 <T > T convertSendAndReceiveAsType (String exchange , String routingKey , Object message ,
576601 ParameterizedTypeReference <T > responseType ) throws AmqpException ;
577602
@@ -589,6 +614,7 @@ <T> T convertSendAndReceiveAsType(String exchange, String routingKey, Object mes
589614 * @throws AmqpException if there is a problem
590615 * @since 2.0
591616 */
617+ @ Nullable
592618 <T > T convertSendAndReceiveAsType (Object message , MessagePostProcessor messagePostProcessor ,
593619 ParameterizedTypeReference <T > responseType ) throws AmqpException ;
594620
@@ -607,6 +633,7 @@ <T> T convertSendAndReceiveAsType(Object message, MessagePostProcessor messagePo
607633 * @throws AmqpException if there is a problem
608634 * @since 2.0
609635 */
636+ @ Nullable
610637 <T > T convertSendAndReceiveAsType (String routingKey , Object message ,
611638 MessagePostProcessor messagePostProcessor , ParameterizedTypeReference <T > responseType )
612639 throws AmqpException ;
@@ -627,6 +654,7 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
627654 * @throws AmqpException if there is a problem
628655 * @since 2.0
629656 */
657+ @ Nullable
630658 <T > T convertSendAndReceiveAsType (String exchange , String routingKey , Object message ,
631659 MessagePostProcessor messagePostProcessor , ParameterizedTypeReference <T > responseType )
632660 throws AmqpException ;
0 commit comments