RxJersey

RxJava extension for Jersey and Dropwizard

License

License

Categories

Categories

Net RxJava Container Microservices Reactive libraries Jersey Program Interface REST Frameworks
GroupId

GroupId

net.winterly.rxjersey
ArtifactId

ArtifactId

rx-jersey-rxjava2
Last Version

Last Version

0.8.0
Release Date

Release Date

Type

Type

jar
Description

Description

RxJersey
RxJava extension for Jersey and Dropwizard
Project URL

Project URL

https://github.com/alex-shpak/rx-jersey
Source Code Management

Source Code Management

https://github.com/alex-shpak/rx-jersey

Download rx-jersey-rxjava2

How to add to project

<!-- https://jarcasting.com/artifacts/net.winterly.rxjersey/rx-jersey-rxjava2/ -->
<dependency>
    <groupId>net.winterly.rxjersey</groupId>
    <artifactId>rx-jersey-rxjava2</artifactId>
    <version>0.8.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.winterly.rxjersey/rx-jersey-rxjava2/
implementation 'net.winterly.rxjersey:rx-jersey-rxjava2:0.8.0'
// https://jarcasting.com/artifacts/net.winterly.rxjersey/rx-jersey-rxjava2/
implementation ("net.winterly.rxjersey:rx-jersey-rxjava2:0.8.0")
'net.winterly.rxjersey:rx-jersey-rxjava2:jar:0.8.0'
<dependency org="net.winterly.rxjersey" name="rx-jersey-rxjava2" rev="0.8.0">
  <artifact name="rx-jersey-rxjava2" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.winterly.rxjersey', module='rx-jersey-rxjava2', version='0.8.0')
)
libraryDependencies += "net.winterly.rxjersey" % "rx-jersey-rxjava2" % "0.8.0"
[net.winterly.rxjersey/rx-jersey-rxjava2 "0.8.0"]

Dependencies

compile (2)

Group / Artifact Type Version
io.reactivex.rxjava2 : rxjava jar 2.0.8
net.winterly.rxjersey : rx-jersey-core jar 0.8.0

test (4)

Group / Artifact Type Version
junit : junit jar 4.11
org.glassfish.jersey.media : jersey-media-json-jackson jar 2.25.1
org.glassfish.jersey.ext : jersey-bean-validation jar 2.25.1
org.glassfish.jersey.test-framework.providers : jersey-test-framework-provider-grizzly2 jar 2.25.1

Project Modules

There are no modules declared in this project.

RxJersey - Reactive Jersey Feature

Build Status Maven Central JitPack

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+ support is not released yet, you can obtain it from JitPack

Documentation

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

Versions

Version
0.8.0