RxJava support for Jersey resources both server and client
Java
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
core-client Added entity tests for clients Jun 5, 2017
core-server Fixed client tests for completable type Jun 5, 2017
docs Various fixes in docs Jul 30, 2017
dropwizard #7, Separated package for rxjava and rxjava2 implementations Nov 15, 2017
example Ignore out directory, updated to gradle 4.4 Jan 27, 2018
gitbook
gradle/wrapper
rxjava-client #7, Separated package for rxjava and rxjava2 implementations Nov 15, 2017
rxjava-server
rxjava2-client
rxjava2-server Fix #9, headers map was reused in reponses Feb 18, 2018
.gitignore
.travis.yml Openjdk to Oraclejdk in travis Apr 2, 2017
LICENSE.txt
README.md Update to dropwizard 1.3.1 May 9, 2018
build.gradle Upgrade to gradle 4.6 Mar 3, 2018
gradle.properties Update to dropwizard 1.3.1 May 9, 2018
gradlew
gradlew.bat Upgrade to gradle 4.6 Mar 3, 2018
maven-central.gradle
settings.gradle Beta implementation for rxjava2 client, most modules was renamed Jun 3, 2017

README.md

RxJersey - Reactive Jersey Feature

Build Status Maven Central

RxJersey is RxJava extension for Jersey framework providing non-blocking Jax-RS server and client. RxJersey target is to handle large amount requests in small static set of threads, which is highly suitable for microservice applications.

Library uses Jersey 2 async support with @Suspended and AsyncResponse under the hood.

Note that Jersey 2.26+ is not supported yet (WIP)

For documentation visit Gitbook

Features

  • RxJava Support
  • RxJava 2 Support
  • RxJava Proxy Client
  • Async Request Interceptors
  • Dropwizard bundle

Roadmap

  • Futures support
  • Vert.x integration
  • Improved proxy client

Maven Artifacts

Maven Central

compile "net.winterly.rxjersey:dropwizard:$rxJerseyVersion"
compile "net.winterly.rxjersey:rxjava-client:$rxJerseyVersion"
compile "net.winterly.rxjersey:rxjava-server:$rxJerseyVersion"
compile "net.winterly.rxjersey:rxjava2-client:$rxJerseyVersion"
compile "net.winterly.rxjersey:rxjava2-server:$rxJerseyVersion"

JitPack

Most recent snapshot is available via JitPack

compile "com.github.alex-shpak.rx-jersey:dropwizard:$rxJerseyVersion"
compile "com.github.alex-shpak.rx-jersey:rxjava-client:$rxJerseyVersion"
compile "com.github.alex-shpak.rx-jersey:rxjava-server:$rxJerseyVersion"
compile "com.github.alex-shpak.rx-jersey:rxjava2-client:$rxJerseyVersion"
compile "com.github.alex-shpak.rx-jersey:rxjava2-server:$rxJerseyVersion"

Example

@Path("/example/")
public class GithubResource {

    @Remote("https://api.github.com/")
    private GithubApi githubApi;

    @GET
    @Path("github")
    public Single<GithubRepository> getRepository() {
        return githubApi.getRepository("alex-shpak", "rx-jersey").toSingle();
    }

}

@Path("/")
public interface GithubApi {

    @GET
    @Path("/repos/{user}/{repo}")
    Observable<GithubRepository> getRepository(@PathParam("user") String username, @PathParam("repo") String repo);
}

Licence

MIT