Dropwizard :: Async Support

Enables the use of CompletableFuture and ListenableFuture as return types from resource methods

License

License

Categories

Categories

DropWizard Container Microservices
GroupId

GroupId

zone.dragon.dropwizard
ArtifactId

ArtifactId

dropwizard-async
Last Version

Last Version

1.2.9-2552d7
Release Date

Release Date

Type

Type

jar
Description

Description

Dropwizard :: Async Support
Enables the use of CompletableFuture and ListenableFuture as return types from resource methods
Project URL

Project URL

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

Project Organization

DragonZone
Source Code Management

Source Code Management

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

Download dropwizard-async

How to add to project

<!-- https://jarcasting.com/artifacts/zone.dragon.dropwizard/dropwizard-async/ -->
<dependency>
    <groupId>zone.dragon.dropwizard</groupId>
    <artifactId>dropwizard-async</artifactId>
    <version>1.2.9-2552d7</version>
</dependency>
// https://jarcasting.com/artifacts/zone.dragon.dropwizard/dropwizard-async/
implementation 'zone.dragon.dropwizard:dropwizard-async:1.2.9-2552d7'
// https://jarcasting.com/artifacts/zone.dragon.dropwizard/dropwizard-async/
implementation ("zone.dragon.dropwizard:dropwizard-async:1.2.9-2552d7")
'zone.dragon.dropwizard:dropwizard-async:jar:1.2.9-2552d7'
<dependency org="zone.dragon.dropwizard" name="dropwizard-async" rev="1.2.9-2552d7">
  <artifact name="dropwizard-async" type="jar" />
</dependency>
@Grapes(
@Grab(group='zone.dragon.dropwizard', module='dropwizard-async', version='1.2.9-2552d7')
)
libraryDependencies += "zone.dragon.dropwizard" % "dropwizard-async" % "1.2.9-2552d7"
[zone.dragon.dropwizard/dropwizard-async "1.2.9-2552d7"]

Dependencies

compile (10)

Group / Artifact Type Version
com.google.guava : guava jar 24.1.1-jre
io.dropwizard : dropwizard-core jar
io.dropwizard : dropwizard-jersey jar
io.dropwizard : dropwizard-jetty jar
javax.inject : javax.inject jar 1
javax.ws.rs : javax.ws.rs-api jar 2.0.1
org.glassfish.hk2 : hk2-api jar
org.glassfish.jersey.bundles.repackaged : jersey-guava jar
org.glassfish.jersey.core : jersey-server jar
org.slf4j : slf4j-api jar 1.7.26

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.6

test (5)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.12.2
org.junit.jupiter : junit-jupiter-api jar 5.5.0
org.junit.jupiter : junit-jupiter-engine jar 5.5.0
io.dropwizard : dropwizard-testing jar
org.eclipse.jetty : jetty-client jar

Project Modules

There are no modules declared in this project.

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.

zone.dragon.dropwizard

Versions

Version
1.2.9-2552d7
1.2.3-93259a
1.1.1-260dd0
1.0.12-d039f6