diff --git a/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingOperations.java b/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingOperations.java
index fb9ffd773c..04ba16bf54 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingOperations.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingOperations.java
@@ -27,6 +27,18 @@ import org.springframework.integration.MessageChannel;
*/
public interface AsyncMessagingOperations {
+
Future> asyncReceive();
+
+ Future> asyncReceive(PollableChannel channel);
+
+ Future> asyncReceive(String channelName);
+
+ Future asyncReceiveAndConvert();
+
+ Future asyncReceiveAndConvert(PollableChannel channel);
+
+ Future asyncReceiveAndConvert(String channelName);
+
Future> asyncSendAndReceive(Message> requestMessage);
Future> asyncSendAndReceive(MessageChannel channel, Message> requestMessage);
diff --git a/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingTemplate.java b/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingTemplate.java
index 28bf3df619..ec066ad5ae 100644
--- a/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingTemplate.java
+++ b/spring-integration-core/src/main/java/org/springframework/integration/core/AsyncMessagingTemplate.java
@@ -93,4 +93,55 @@ public class AsyncMessagingTemplate extends MessagingTemplate implements AsyncMe
});
}
+ public Future> asyncReceive() {
+ return this.executor.submit(new Callable>() {
+ public Message call() throws Exception {
+ return receive();
+ }
+ });
+ }
+
+ public
Future> asyncReceive(final PollableChannel channel) {
+ return this.executor.submit(new Callable>() {
+ public Message call() throws Exception {
+ return receive(channel);
+ }
+ });
+ }
+
+ public
Future> asyncReceive(final String channelName) {
+ return this.executor.submit(new Callable>() {
+ public Message call() throws Exception {
+ return receive(channelName);
+ }
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ public Future asyncReceiveAndConvert() {
+ return this.executor.submit(new Callable() {
+ public R call() throws Exception {
+ return (R) receiveAndConvert();
+ }
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ public Future asyncReceiveAndConvert(final PollableChannel channel) {
+ return this.executor.submit(new Callable() {
+ public R call() throws Exception {
+ return (R) receiveAndConvert(channel);
+ }
+ });
+ }
+
+ @SuppressWarnings("unchecked")
+ public Future asyncReceiveAndConvert(final String channelName) {
+ return this.executor.submit(new Callable() {
+ public R call() throws Exception {
+ return (R) receiveAndConvert(channelName);
+ }
+ });
+ }
+
}