Groovy Documentation

reactor.groovy.ext
[Groovy] Class ComposableExtensions

java.lang.Object
  reactor.groovy.ext.ComposableExtensions

@groovy.transform.CompileStatic
class ComposableExtensions

Glue for Groovy closures and operator overloading applied to Stream, Composable, Promise and Deferred. Also gives convenient Deferred handling by providing map/filter/consume operations

Authors:
Jon Brisbin
Stephane Maldini


Method Summary
static Stream and(Stream selfType, groovy.lang.Closure other)

static Promise and(Promise selfType, groovy.lang.Closure other)

static Composable and(Deferred selfType, groovy.lang.Closure other)

static Stream and(Stream selfType, Predicate other)

static Promise and(Promise selfType, Predicate other)

static Composable and(Deferred selfType, Predicate other)

static Promise bind(Promise selfType, groovy.lang.Closure closure)

static Stream consume(Stream selfType, groovy.lang.Closure closure)

static Composable consume(Deferred selfType, groovy.lang.Closure closure)

static Promise consume(Promise selfType, groovy.lang.Closure closure)

static Stream filter(Stream selfType, groovy.lang.Closure closure)

static Composable filter(Deferred selfType, groovy.lang.Closure closure)

static Promise filter(Promise selfType, groovy.lang.Closure closure)

static Stream leftShift(Stream selfType, Consumer other)

static Composable leftShift(Deferred selfType, Consumer other)

static Stream leftShift(Stream selfType, groovy.lang.Closure other)

static Composable leftShift(Deferred selfType, groovy.lang.Closure other)

static Promise leftShift(Promise selfType, Consumer other)

static Promise leftShift(Promise selfType, groovy.lang.Closure other)

static Consumer leftShift(Consumer selfType, java.lang.Object value)

static Deferred leftShift(Deferred selfType, java.lang.Object value)

static Composable map(Deferred selfType, groovy.lang.Closure closure)

Closure converters

static Stream map(Stream selfType, groovy.lang.Closure closure)

static Promise map(Promise selfType, groovy.lang.Closure closure)

static Stream mapMany(Stream selfType, groovy.lang.Closure closure)

static Stream mod(Stream selfType, Function other)

Operator overloading

static Stream mod(Stream selfType, groovy.lang.Closure other)

static Promise onComplete(Promise selfType, groovy.lang.Closure closure)

static Promise onError(Promise selfType, groovy.lang.Closure closure)

static Promise onSuccess(Promise selfType, groovy.lang.Closure closure)

static Stream or(Stream selfType, Function other)

static Stream or(Stream selfType, groovy.lang.Closure other)

static Composable or(Deferred selfType, Function other)

static Composable or(Deferred selfType, groovy.lang.Closure other)

static Promise or(Promise selfType, Function other)

static Promise or(Promise selfType, groovy.lang.Closure other)

static Stream reduce(Stream selfType, groovy.lang.Closure closure, java.lang.Object initial = null)

static Stream reduce(Stream selfType, groovy.lang.Closure closure, groovy.lang.Closure initial)

static Stream reduce(Stream selfType, groovy.lang.Closure closure, Supplier initial)

static Promise then(Promise selfType, groovy.lang.Closure closureSuccess, groovy.lang.Closure closureError = null)

static X to(X selfType, java.lang.Object key, Observable observable)

Alias

static Stream when(Stream selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)

static Composable when(Deferred selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)

static Promise when(Promise selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

and

static Stream and(Stream selfType, groovy.lang.Closure other)


and

static Promise and(Promise selfType, groovy.lang.Closure other)


and

static Composable and(Deferred selfType, groovy.lang.Closure other)


and

static Stream and(Stream selfType, Predicate other)


and

static Promise and(Promise selfType, Predicate other)


and

static Composable and(Deferred selfType, Predicate other)


bind

static Promise bind(Promise selfType, groovy.lang.Closure closure)


consume

static Stream consume(Stream selfType, groovy.lang.Closure closure)


consume

static Composable consume(Deferred selfType, groovy.lang.Closure closure)


consume

static Promise consume(Promise selfType, groovy.lang.Closure closure)


filter

static Stream filter(Stream selfType, groovy.lang.Closure closure)


filter

static Composable filter(Deferred selfType, groovy.lang.Closure closure)


filter

static Promise filter(Promise selfType, groovy.lang.Closure closure)


leftShift

static Stream leftShift(Stream selfType, Consumer other)


leftShift

static Composable leftShift(Deferred selfType, Consumer other)


leftShift

static Stream leftShift(Stream selfType, groovy.lang.Closure other)


leftShift

static Composable leftShift(Deferred selfType, groovy.lang.Closure other)


leftShift

static Promise leftShift(Promise selfType, Consumer other)


leftShift

static Promise leftShift(Promise selfType, groovy.lang.Closure other)


leftShift

static Consumer leftShift(Consumer selfType, java.lang.Object value)


leftShift

static Deferred leftShift(Deferred selfType, java.lang.Object value)


map

static Composable map(Deferred selfType, groovy.lang.Closure closure)
Closure converters


map

static Stream map(Stream selfType, groovy.lang.Closure closure)


map

static Promise map(Promise selfType, groovy.lang.Closure closure)


mapMany

static Stream mapMany(Stream selfType, groovy.lang.Closure closure)


mod

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
static Stream mod(Stream selfType, Function other)
Operator overloading


mod

static Stream mod(Stream selfType, groovy.lang.Closure other)


onComplete

static Promise onComplete(Promise selfType, groovy.lang.Closure closure)


onError

static Promise onError(Promise selfType, groovy.lang.Closure closure)


onSuccess

static Promise onSuccess(Promise selfType, groovy.lang.Closure closure)


or

static Stream or(Stream selfType, Function other)


or

static Stream or(Stream selfType, groovy.lang.Closure other)


or

static Composable or(Deferred selfType, Function other)


or

static Composable or(Deferred selfType, groovy.lang.Closure other)


or

static Promise or(Promise selfType, Function other)


or

static Promise or(Promise selfType, groovy.lang.Closure other)


reduce

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
static Stream reduce(Stream selfType, groovy.lang.Closure closure, java.lang.Object initial = null)


reduce

static Stream reduce(Stream selfType, groovy.lang.Closure closure, groovy.lang.Closure initial)


reduce

@groovy.transform.CompileStatic(TypeCheckingMode.SKIP)
static Stream reduce(Stream selfType, groovy.lang.Closure closure, Supplier initial)


then

static Promise then(Promise selfType, groovy.lang.Closure closureSuccess, groovy.lang.Closure closureError = null)


to

static X to(X selfType, java.lang.Object key, Observable observable)
Alias


when

static Stream when(Stream selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)


when

static Composable when(Deferred selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)


when

static Promise when(Promise selfType, java.lang.Class exceptionType, groovy.lang.Closure closure)


 

Groovy Documentation