An open API service indexing awesome lists of open source software.

https://github.com/dragonzone/dropwizard-async

Enable Non-Blocking support for resources that return futures
https://github.com/dragonzone/dropwizard-async

concurrency dropwizard non-blocking promises

Last synced: 5 months ago
JSON representation

Enable Non-Blocking support for resources that return futures

Awesome Lists containing this project

README

          

# Dropwizard Async Non-Blocking [![Build Status](https://jenkins.dragon.zone/buildStatus/icon?job=dragonzone/dropwizard-async/master)](https://jenkins.dragon.zone/blue/organizations/jenkins/dragonzone%2Fdropwizard-async/activity?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/zone.dragon.dropwizard/dropwizard-async/badge.svg)](https://maven-badges.herokuapp.com/maven-central/zone.dragon.dropwizard/dropwizard-async/)

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 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.