Promises (Grails 2.3.8)
Date: 2014-04-24

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

## grails.async
[Java] Class Promises

    java.lang.Object
      grails.async.Promises

    public class Promises
    extends java.lang.Object

Factory class for working with Promise instances

Authors:
  Graeme Rocher

Since:
  2.3

Method Summary
`static Promise` | `createBoundPromise(java.lang.Object value)` @see PromiseFactory#createBoundPromise(java.lang.Object)
`static Promise` | `createPromise(java.util.Map map)` @see PromiseFactory#createPromise(java.util.Map)
`static Promise` | `createPromise(groovy.lang.Closure... c)` @see PromiseFactory#createPromise(groovy.lang.Closure[])
`static Promise` | `createPromise(groovy.lang.Closure c, java.util.List decorators)` @see PromiseFactory#createPromise(groovy.lang.Closure, java.util.List)
`static Promise` | `createPromise(java.util.List closures, java.util.List decorators)` @see PromiseFactory#createPromise(java.util.List, java.util.List)
`static Promise` | `createPromise(Promise... promises)` @see PromiseFactory#createPromise(grails.async.Promise[])
`static PromiseFactory` | `getPromiseFactory()`
`static Promise` | `onComplete(java.util.List promises, groovy.lang.Closure callable)` @see PromiseFactory#onComplete(java.util.List, groovy.lang.Closure)
`static Promise` | `onError(java.util.List promises, groovy.lang.Closure callable)` @see PromiseFactory#onError(java.util.List, groovy.lang.Closure)
`static void` | `setPromiseFactory(PromiseFactory promiseFactory)`
`static Promise` | `task(groovy.lang.Closure c)` @see PromiseFactory#createPromise(groovy.lang.Closure[])
`static Promise` | `tasks(java.util.Map map)` @see PromiseFactory#createPromise(java.util.Map)
`static Promise` | `tasks(groovy.lang.Closure... c)` @see PromiseFactory#createPromise(groovy.lang.Closure[])
`static Promise` | `tasks(java.util.List closures)` @see PromiseFactory#createPromise(groovy.lang.Closure[])
`static java.util.List` | `waitAll(Promise... promises)` @see PromiseFactory#waitAll(grails.async.Promise[])
`static java.util.List` | `waitAll(java.util.List promises)` @see PromiseFactory#waitAll(java.util.List)
`static java.util.List` | `waitAll(java.util.List promises, long timeout, java.util.concurrent.TimeUnit units)` @see PromiseFactory#waitAll(java.util.List)

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

### createBoundPromise

    public static Promise createBoundPromise(java.lang.Object value)

  See Also:
    PromiseFactory.createBoundPromise

### createPromise

    public static Promise createPromise(java.util.Map map)

  See Also:
    PromiseFactory.createPromise

### createPromise

    public static Promise createPromise(groovy.lang.Closure... c)

  See Also:
    PromiseFactory.createPromise

### createPromise

    public static Promise createPromise(groovy.lang.Closure c, java.util.List decorators)

  See Also:
    PromiseFactory.createPromise

### createPromise

    public static Promise createPromise(java.util.List closures, java.util.List decorators)

  See Also:
    PromiseFactory.createPromise

### createPromise

    public static Promise createPromise(Promise... promises)

  See Also:
    PromiseFactory.createPromise

### getPromiseFactory

    public static PromiseFactory getPromiseFactory()

### onComplete

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

  See Also:
    PromiseFactory.onComplete

### onError

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

  See Also:
    PromiseFactory.onError

### setPromiseFactory

    public static void setPromiseFactory(PromiseFactory promiseFactory)

### task

    public static Promise task(groovy.lang.Closure c)

  See Also:
    PromiseFactory.createPromise

### tasks

    public static Promise tasks(java.util.Map map)

  See Also:
    PromiseFactory.createPromise

### tasks

    public static Promise tasks(groovy.lang.Closure... c)

  See Also:
    PromiseFactory.createPromise

### tasks

    public static Promise tasks(java.util.List closures)

  See Also:
    PromiseFactory.createPromise

### waitAll

    public static java.util.List waitAll(Promise... promises)

  See Also:
    PromiseFactory.waitAll

### waitAll

    public static java.util.List waitAll(java.util.List promises)

  See Also:
    PromiseFactory.waitAll

### waitAll

    public static java.util.List waitAll(java.util.List promises, long timeout, java.util.concurrent.TimeUnit units)

  See Also:
    PromiseFactory.waitAll

Groovy Documentation