Skip to content

Gateway proxies should support Future return types on interface methods [INT-1414] #5408

Closed

Description

@spring-operator

Mark Fisher opened INT-1414 and commented

We need to support Futures that are parameterized with Message as well as non-Message types, e.g.:

static interface TestEchoService {

    Future<String> returnString(String s);

    Future<Message<?>> returnMessage(String s);

    Future<?> returnSomething(String s);

}

With a Future return-type the Gateway method invocation will return immediately with the Future providing access to the result via the blocking get() or get(timeout, timeunit) calls. If an Exception occurred during an asynchronous message flow downstream, that would be re-thrown when get(..) is called. If the get(timeout, timeunit) times out, that will trigger a TimeoutException. This provides the caller with the option to set any timeout value (as opposed to the synchronous method invocation which is always based on requestTimeout and replyTimeout values of the Gateway itself). Finally, if a particular asynchronous Gateway invocation needs to be cancelled, then the caller can invoke cancel() on the Future.


Affects: 2.0 M6

Issue Links:

Activity

  1. spring-operator commented on Sep 3, 2010

    @spring-operator
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions