Getting started
Getting started is as simple as setting up a basic Reactive flow such as the following and evolving from there -
List<String> strings = new SimpleReact()
.<Integer> react(() -> 1, () -> 2, () -> 3)
.then(it -> it * 100)
.then(it -> "*" + it)
.block();
This will result in a list, that looks something like this :
["*100","*200","*300"]Although not necessarily in that order. All the work will be done asynchronously, and the block() method blocks the current thread until all the work is complete (& blocking the current thread is optional). See more examples on the SimpleReact wiki .
Adding SimpleReact as a dependency
SimpleReact is available on Maven Central.
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.1'
Gradle
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.1</version>
<scope>compile</scope>
</dependency>
No comments:
Post a Comment