Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 996 Bytes

File metadata and controls

14 lines (10 loc) · 996 Bytes

Dropwizard Async Non-Blocking Build Status Maven Central

This bundle adds support for resources methods to return CompletionStage and ListenableFuture types, which allow for fully non-blocking handling of requests.

To use this bundle, add it to your application in the initialize method:

@Override
public void initialize(Bootstrap<T> bootstrap) {
    bootstrap.addBundle(new AsyncBundle());
}

After that, simply return a CompletableFuture from your resource methods and they will no longer tie up jetty request threads while the request continues to process.