Skip to content

Commit 56b250e

Browse files
committed
GH-1410: AmqpTemplate Javadoc Polishing
Resolves #1410 Explain that send and receive methods return null on timeout.
1 parent d77e2d4 commit 56b250e

File tree

1 file changed

+64
-64
lines changed

1 file changed

+64
-64
lines changed

spring-amqp/src/main/java/org/springframework/amqp/core/AmqpTemplate.java

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,9 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
419419
* and attempt to receive a response. Implementations will normally set the reply-to
420420
* header to an exclusive queue and wait up for some time limited by a timeout.
421421
*
422-
* @param message a message to send
423-
* @return the response if there is one
424-
* @throws AmqpException if there is a problem
422+
* @param message a message to send.
423+
* @return the response; or null if the reply times out.
424+
* @throws AmqpException if there is a problem.
425425
*/
426426
@Nullable
427427
Message sendAndReceive(Message message) throws AmqpException;
@@ -431,10 +431,10 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
431431
* and attempt to receive a response. Implementations will normally set the reply-to
432432
* header to an exclusive queue and wait up for some time limited by a timeout.
433433
*
434-
* @param routingKey the routing key
435-
* @param message a message to send
436-
* @return the response if there is one
437-
* @throws AmqpException if there is a problem
434+
* @param routingKey the routing key.
435+
* @param message a message to send.
436+
* @return the response; or null if the reply times out.
437+
* @throws AmqpException if there is a problem.
438438
*/
439439
@Nullable
440440
Message sendAndReceive(String routingKey, Message message) throws AmqpException;
@@ -445,11 +445,11 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
445445
* reply-to header to an exclusive queue and wait up for some time limited by a
446446
* timeout.
447447
*
448-
* @param exchange the name of the exchange
449-
* @param routingKey the routing key
450-
* @param message a message to send
451-
* @return the response if there is one
452-
* @throws AmqpException if there is a problem
448+
* @param exchange the name of the exchange.
449+
* @param routingKey the routing key.
450+
* @param message a message to send.
451+
* @return the response; or null if the reply times out.
452+
* @throws AmqpException if there is a problem.
453453
*/
454454
@Nullable
455455
Message sendAndReceive(String exchange, String routingKey, Message message) throws AmqpException;
@@ -462,9 +462,9 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
462462
* converting that to a Java object. Implementations will normally set the reply-to
463463
* header to an exclusive queue and wait up for some time limited by a timeout.
464464
*
465-
* @param message a message to send
466-
* @return the response if there is one
467-
* @throws AmqpException if there is a problem
465+
* @param message a message to send.
466+
* @return the response; or null if the reply times out.
467+
* @throws AmqpException if there is a problem.
468468
*/
469469
@Nullable
470470
Object convertSendAndReceive(Object message) throws AmqpException;
@@ -475,10 +475,10 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
475475
* converting that to a Java object. Implementations will normally set the reply-to
476476
* header to an exclusive queue and wait up for some time limited by a timeout.
477477
*
478-
* @param routingKey the routing key
479-
* @param message a message to send
480-
* @return the response if there is one
481-
* @throws AmqpException if there is a problem
478+
* @param routingKey the routing key.
479+
* @param message a message to send.
480+
* @return the response; or null if the reply times out.
481+
* @throws AmqpException if there is a problem.
482482
*/
483483
@Nullable
484484
Object convertSendAndReceive(String routingKey, Object message) throws AmqpException;
@@ -489,11 +489,11 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
489489
* converting that to a Java object. Implementations will normally set the reply-to
490490
* header to an exclusive queue and wait up for some time limited by a timeout.
491491
*
492-
* @param exchange the name of the exchange
493-
* @param routingKey the routing key
494-
* @param message a message to send
495-
* @return the response if there is one
496-
* @throws AmqpException if there is a problem
492+
* @param exchange the name of the exchange.
493+
* @param routingKey the routing key.
494+
* @param message a message to send.
495+
* @return the response; or null if the reply times out.
496+
* @throws AmqpException if there is a problem.
497497
*/
498498
@Nullable
499499
Object convertSendAndReceive(String exchange, String routingKey, Object message) throws AmqpException;
@@ -504,10 +504,10 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
504504
* converting that to a Java object. Implementations will normally set the reply-to
505505
* header to an exclusive queue and wait up for some time limited by a timeout.
506506
*
507-
* @param message a message to send
508-
* @param messagePostProcessor a processor to apply to the message before it is sent
509-
* @return the response if there is one
510-
* @throws AmqpException if there is a problem
507+
* @param message a message to send.
508+
* @param messagePostProcessor a processor to apply to the message before it is sent.
509+
* @return the response; or null if the reply times out.
510+
* @throws AmqpException if there is a problem.
511511
*/
512512
@Nullable
513513
Object convertSendAndReceive(Object message, MessagePostProcessor messagePostProcessor) throws AmqpException;
@@ -518,11 +518,11 @@ <R, S> boolean receiveAndReply(String queueName, ReceiveAndReplyCallback<R, S> c
518518
* converting that to a Java object. Implementations will normally set the reply-to
519519
* header to an exclusive queue and wait up for some time limited by a timeout.
520520
*
521-
* @param routingKey the routing key
522-
* @param message a message to send
523-
* @param messagePostProcessor a processor to apply to the message before it is sent
524-
* @return the response if there is one
525-
* @throws AmqpException if there is a problem
521+
* @param routingKey the routing key.
522+
* @param message a message to send.
523+
* @param messagePostProcessor a processor to apply to the message before it is sent.
524+
* @return the response; or null if the reply times out.
525+
* @throws AmqpException if there is a problem.
526526
*/
527527
@Nullable
528528
Object convertSendAndReceive(String routingKey, Object message, MessagePostProcessor messagePostProcessor)
@@ -534,12 +534,12 @@ Object convertSendAndReceive(String routingKey, Object message, MessagePostProce
534534
* converting that to a Java object. Implementations will normally set the reply-to
535535
* header to an exclusive queue and wait up for some time limited by a timeout.
536536
*
537-
* @param exchange the name of the exchange
538-
* @param routingKey the routing key
539-
* @param message a message to send
540-
* @param messagePostProcessor a processor to apply to the message before it is sent
541-
* @return the response if there is one
542-
* @throws AmqpException if there is a problem
537+
* @param exchange the name of the exchange.
538+
* @param routingKey the routing key.
539+
* @param message a message to send.
540+
* @param messagePostProcessor a processor to apply to the message before it is sent.
541+
* @return the response; or null if the reply times out.
542+
* @throws AmqpException if there is a problem.
543543
*/
544544
@Nullable
545545
Object convertSendAndReceive(String exchange, String routingKey, Object message,
@@ -555,7 +555,7 @@ Object convertSendAndReceive(String exchange, String routingKey, Object message,
555555
* @param message a message to send.
556556
* @param responseType the type to convert the reply to.
557557
* @param <T> the type.
558-
* @return the response if there is one.
558+
* @return the response; or null if the reply times out.
559559
* @throws AmqpException if there is a problem.
560560
* @since 2.0
561561
*/
@@ -569,12 +569,12 @@ <T> T convertSendAndReceiveAsType(Object message, ParameterizedTypeReference<T>
569569
* converting that to a Java object. Implementations will normally set the reply-to
570570
* header to an exclusive queue and wait up for some time limited by a timeout.
571571
* Requires a {@link org.springframework.amqp.support.converter.SmartMessageConverter}.
572-
* @param routingKey the routing key
573-
* @param message a message to send
572+
* @param routingKey the routing key.
573+
* @param message a message to send.
574574
* @param responseType the type to convert the reply to.
575575
* @param <T> the type.
576-
* @return the response if there is one
577-
* @throws AmqpException if there is a problem
576+
* @return the response; or null if the reply times out.
577+
* @throws AmqpException if there is a problem.
578578
* @since 2.0
579579
*/
580580
@Nullable
@@ -587,13 +587,13 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
587587
* converting that to a Java object. Implementations will normally set the reply-to
588588
* header to an exclusive queue and wait up for some time limited by a timeout.
589589
* Requires a {@link org.springframework.amqp.support.converter.SmartMessageConverter}.
590-
* @param exchange the name of the exchange
591-
* @param routingKey the routing key
592-
* @param message a message to send
590+
* @param exchange the name of the exchange.
591+
* @param routingKey the routing key.
592+
* @param message a message to send.
593593
* @param responseType the type to convert the reply to.
594594
* @param <T> the type.
595-
* @return the response if there is one
596-
* @throws AmqpException if there is a problem
595+
* @return the response; or null if the reply times out.
596+
* @throws AmqpException if there is a problem.
597597
* @since 2.0
598598
*/
599599
@Nullable
@@ -606,12 +606,12 @@ <T> T convertSendAndReceiveAsType(String exchange, String routingKey, Object mes
606606
* converting that to a Java object. Implementations will normally set the reply-to
607607
* header to an exclusive queue and wait up for some time limited by a timeout.
608608
* Requires a {@link org.springframework.amqp.support.converter.SmartMessageConverter}.
609-
* @param message a message to send
610-
* @param messagePostProcessor a processor to apply to the message before it is sent
609+
* @param message a message to send.
610+
* @param messagePostProcessor a processor to apply to the message before it is sent.
611611
* @param responseType the type to convert the reply to.
612612
* @param <T> the type.
613-
* @return the response if there is one
614-
* @throws AmqpException if there is a problem
613+
* @return the response; or null if the reply times out.
614+
* @throws AmqpException if there is a problem.
615615
* @since 2.0
616616
*/
617617
@Nullable
@@ -624,13 +624,13 @@ <T> T convertSendAndReceiveAsType(Object message, MessagePostProcessor messagePo
624624
* converting that to a Java object. Implementations will normally set the reply-to
625625
* header to an exclusive queue and wait up for some time limited by a timeout.
626626
* Requires a {@link org.springframework.amqp.support.converter.SmartMessageConverter}.
627-
* @param routingKey the routing key
628-
* @param message a message to send
629-
* @param messagePostProcessor a processor to apply to the message before it is sent
627+
* @param routingKey the routing key.
628+
* @param message a message to send.
629+
* @param messagePostProcessor a processor to apply to the message before it is sent.
630630
* @param responseType the type to convert the reply to.
631631
* @param <T> the type.
632-
* @return the response if there is one
633-
* @throws AmqpException if there is a problem
632+
* @return the response; or null if the reply times out.
633+
* @throws AmqpException if there is a problem.
634634
* @since 2.0
635635
*/
636636
@Nullable
@@ -644,14 +644,14 @@ <T> T convertSendAndReceiveAsType(String routingKey, Object message,
644644
* converting that to a Java object. Implementations will normally set the reply-to
645645
* header to an exclusive queue and wait up for some time limited by a timeout.
646646
* Requires a {@link org.springframework.amqp.support.converter.SmartMessageConverter}.
647-
* @param exchange the name of the exchange
648-
* @param routingKey the routing key
649-
* @param message a message to send
650-
* @param messagePostProcessor a processor to apply to the message before it is sent
647+
* @param exchange the name of the exchange.
648+
* @param routingKey the routing key.
649+
* @param message a message to send.
650+
* @param messagePostProcessor a processor to apply to the message before it is sent.
651651
* @param responseType the type to convert the reply to.
652652
* @param <T> the type.
653-
* @return the response if there is one
654-
* @throws AmqpException if there is a problem
653+
* @return the response; or null if the reply times out.
654+
* @throws AmqpException if there is a problem.
655655
* @since 2.0
656656
*/
657657
@Nullable

0 commit comments

Comments
 (0)