spring-projects/spring-integration — pull request #1267 by garyrussell (2014-08-28 17:30:57+00:00)
Title: INT-3506 Async Gateway Improvements

JIRA: https://jira.spring.io/browse/INT-3506
JIRA: https://jira.spring.io/browse/INT-3428

Support flows downstream of the gateway that support
returning a `Future` payload.

Currently, any method that returns a type that is assignable
to `Future` runs async and returns a `FutureTask`.

This prevents a service-interface method that returns a
custom `Future` object from being invoked without wrapping
that `Future` in a `FutureTask`.

Allow the async-executor to be set to `null` causing any method
returning `Future` to run on the calling thread.

Add support for `ListenableFuture`.

If the return type is a `RunnableFuture`, `ListenableFuture` or
`Future`, or exactly a `FutureTask` or `ListenableFutureTask`, run the flow
on the executor (if present); otherwise run on the calling thread.

Still needs docs.