@@ -92,11 +92,30 @@ default CompletableFuture<Object> receiveAndConvert(String queueName) {
92
92
throw new UnsupportedOperationException ();
93
93
}
94
94
95
- default <T > CompletableFuture <T > receiveAndConvert (ParameterizedTypeReference <T > type ) {
95
+ default <T > CompletableFuture <T > receiveAndConvert (@ Nullable ParameterizedTypeReference <T > type ) {
96
96
throw new UnsupportedOperationException ();
97
97
}
98
98
99
- default <T > CompletableFuture <T > receiveAndConvert (String queueName , ParameterizedTypeReference <T > type ) {
99
+ default <T > CompletableFuture <T > receiveAndConvert (String queueName , @ Nullable ParameterizedTypeReference <T > type ) {
100
+ throw new UnsupportedOperationException ();
101
+ }
102
+
103
+ default <R , S > CompletableFuture <Boolean > receiveAndReply (ReceiveAndReplyCallback <R , S > callback ) {
104
+ throw new UnsupportedOperationException ();
105
+ }
106
+
107
+ /**
108
+ * Perform a server-side RPC functionality.
109
+ * The request message must have a {@code replyTo} property.
110
+ * The request {@code messageId} property is used for correlation.
111
+ * The callback might not produce a reply with the meaning nothing to answer.
112
+ * @param queueName the queue to consume request.
113
+ * @param callback an application callback to handle request and produce reply.
114
+ * @return the completion status: true if no errors and reply has been produced.
115
+ * @param <R> the request body type.
116
+ * @param <S> the response body type
117
+ */
118
+ default <R , S > CompletableFuture <Boolean > receiveAndReply (String queueName , ReceiveAndReplyCallback <R , S > callback ) {
100
119
throw new UnsupportedOperationException ();
101
120
}
102
121
@@ -240,8 +259,9 @@ <C> CompletableFuture<C> convertSendAndReceiveAsType(String exchange, String rou
240
259
* @param <C> the expected result type.
241
260
* @return the {@link CompletableFuture}.
242
261
*/
243
- <C > CompletableFuture <C > convertSendAndReceiveAsType (Object object , MessagePostProcessor messagePostProcessor ,
244
- ParameterizedTypeReference <C > responseType );
262
+ <C > CompletableFuture <C > convertSendAndReceiveAsType (Object object ,
263
+ @ Nullable MessagePostProcessor messagePostProcessor ,
264
+ @ Nullable ParameterizedTypeReference <C > responseType );
245
265
246
266
/**
247
267
* Convert the object to a message and send it to the default exchange with the
0 commit comments