Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.grails.async.factory
[Groovy] Class SynchronousPromiseFactory

    java.lang.Object
      org.grails.async.factory.AbstractPromiseFactory
          org.grails.async.factory.SynchronousPromiseFactory

    @groovy.transform.CompileStatic
    class SynchronousPromiseFactory
    extends AbstractPromiseFactory

A PromiseFactory implementation that constructors promises that execute synchronously. Useful for testing environments.

Authors:
  Graeme Rocher

Since:
  2.3

Field Summary

Fields inherited from class AbstractPromiseFactory
lookupStrategies

Method Summary
`Promise` | `createPromise(groovy.lang.Closure... closures)`
`Promise` | `onComplete(java.util.List promises, groovy.lang.Closure callable)`
`Promise` | `onError(java.util.List promises, groovy.lang.Closure callable)`
`java.util.List` | `waitAll(java.util.List promises)`
`java.util.List` | `waitAll(java.util.List promises, long timeout, java.util.concurrent.TimeUnit units)`

Methods inherited from class AbstractPromiseFactory
addPromiseDecoratorLookupStrategy, applyDecorators, createBoundPromise, createPromise, createPromise, createPromise, createPromise, createPromise, waitAll

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

### createPromise

    @java.lang.Override
    Promise createPromise(groovy.lang.Closure... closures)

### onComplete

    Promise onComplete(java.util.List promises, groovy.lang.Closure callable)

### onError

    Promise onError(java.util.List promises, groovy.lang.Closure callable)

### waitAll

    @java.lang.Override
    java.util.List waitAll(java.util.List promises)

### waitAll

    @java.lang.Override
    java.util.List waitAll(java.util.List promises, long timeout, java.util.concurrent.TimeUnit units)

Groovy Documentation