INT-1411 added tests for asyncReceive operations
This commit is contained in:
@@ -27,11 +27,11 @@ import org.springframework.integration.MessageChannel;
|
||||
*/
|
||||
public interface AsyncMessagingOperations {
|
||||
|
||||
<P> Future<Message<P>> asyncReceive();
|
||||
Future<Message<?>> asyncReceive();
|
||||
|
||||
<P> Future<Message<P>> asyncReceive(PollableChannel channel);
|
||||
Future<Message<?>> asyncReceive(PollableChannel channel);
|
||||
|
||||
<P> Future<Message<P>> asyncReceive(String channelName);
|
||||
Future<Message<?>> asyncReceive(String channelName);
|
||||
|
||||
<R> Future<R> asyncReceiveAndConvert();
|
||||
|
||||
|
||||
@@ -42,25 +42,25 @@ public class AsyncMessagingTemplate extends MessagingTemplate implements AsyncMe
|
||||
(AsyncTaskExecutor) executor : new TaskExecutorAdapter(executor);
|
||||
}
|
||||
|
||||
public <P> Future<Message<P>> asyncReceive() {
|
||||
return this.executor.submit(new Callable<Message<P>>() {
|
||||
public Message<P> call() throws Exception {
|
||||
public Future<Message<?>> asyncReceive() {
|
||||
return this.executor.submit(new Callable<Message<?>>() {
|
||||
public Message<?> call() throws Exception {
|
||||
return receive();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public <P> Future<Message<P>> asyncReceive(final PollableChannel channel) {
|
||||
return this.executor.submit(new Callable<Message<P>>() {
|
||||
public Message<P> call() throws Exception {
|
||||
public Future<Message<?>> asyncReceive(final PollableChannel channel) {
|
||||
return this.executor.submit(new Callable<Message<?>>() {
|
||||
public Message<?> call() throws Exception {
|
||||
return receive(channel);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public <P> Future<Message<P>> asyncReceive(final String channelName) {
|
||||
return this.executor.submit(new Callable<Message<P>>() {
|
||||
public Message<P> call() throws Exception {
|
||||
public Future<Message<?>> asyncReceive(final String channelName) {
|
||||
return this.executor.submit(new Callable<Message<?>>() {
|
||||
public Message<?> call() throws Exception {
|
||||
return receive(channelName);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user