Ratpack support for rxjava2
<dependency>
<groupId>me.drmaas</groupId>
<artifactId>ratpack-rx2</artifactId>
<version>x.x.x/version>
</dependency>
ratpack {
handlers {
get(":value") {
observe(Blocking.get {
pathTokens.value
}).promiseSingle().then {
render it
}
}
}
}
ratpack {
handlers {
get(":value") {
flow(Blocking.get {
pathTokens.value
}, BackpressureStrategy.BUFFER).promiseSingle().then {
render it
}
}
}
}
ratpack {
handlers {
get(":value") {
single(Blocking.get {
pathTokens.value
}).promiseSingle().then {
render it
}
}
}
}
ratpack {
handlers {
get(":value") {
maybe(Blocking.get {
pathTokens.value
}).promiseSingle().then {
render it
}
}
}
}
A detailed listing of use cases should follow logically from those documentated at https://ratpack.io/manual/current/api/ratpack/rx/RxRatpack.html