Project Reactor implementation of the Reactive Streams
Wrappers around the Project Reactor's Flux
and Mono
adapting to the Publishable
(FluxPublishable
and MonoPublishable
)
extension of Reactive Streams' SubscribeSupport
.
import org.moodminds.reactive.FluxPublishable;
import org.moodminds.reactive.MonoPublishable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import static org.moodminds.reactive.FluxPublishable.flux;
import static org.moodminds.reactive.MonoPublishable.mono;
class Sample {
void sample() {
Mono<String> mono = Mono.just("a");
Flux<String> flux = Flux.just("a", "b", "c");
MonoPublishable<String, ?> monoPublishable = mono(mono);
FluxPublishable<String, ?> fluxPublishable = flux(flux);
}
}
Artifacts can be found on Maven Central after publication.
<dependency>
<groupId>org.moodminds.reactive</groupId>
<artifactId>reactive-streams-publishable</artifactId>
<version>${version}</version>
</dependency>
You may need to build from source to use Reactive Streams Publishable (until it is in Maven Central) with Maven and JDK 1.8 at least.
This project is going to be released under version 2.0 of the Apache License.