Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Completes<T> and CompletableFuture<T> In One Pipeline #15

Open
VaughnVernon opened this issue Sep 12, 2019 · 0 comments
Open

Support Completes<T> and CompletableFuture<T> In One Pipeline #15

VaughnVernon opened this issue Sep 12, 2019 · 0 comments

Comments

@VaughnVernon
Copy link
Contributor

VaughnVernon commented Sep 12, 2019

When starting out with either Completes<T> or CompletableFuture<T> and then transitioning to the other in the same pipeline, you can't get back to Completes<T> from CompletableFuture<T> because CompletableFuture<T> only returns CompletableFuture<T> instances.

This is a problem where with vlingo-http, for example, a RequestHandler must return a Completes<T> rather than CompletableFuture<T>.

The solution is for Completes<T> to support both Completes<T> and CompletableFuture<T> as parameters to the various forms of andThen() and andThenTo().

In time we may also choose to support CompletableFuture<T> for vlingo-http Request/Response.

P.S. We can't expect CompletableFuture<T> to support Completes<T> ever, so it's on us to support CompletableFuture<T>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant