net.sf.asyncobjects.util
Class Any
java.lang.Object
net.sf.asyncobjects.util.RunDispatcher
net.sf.asyncobjects.util.Any
- All Implemented Interfaces:
- ExplicitSharing
public abstract class Any
- extends RunDispatcher
This class allows to get first ready value out of number of alternatives.
Constructor Summary |
Any()
A constructor. |
Any(boolean ignoreFailures)
A constructor |
Methods inherited from class net.sf.asyncobjects.util.RunDispatcher |
run1, run10, run11, run12, run13, run14, run15, run16, run2, run3, run4, run5, run6, run7, run8, run9, runNext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Any
public Any(boolean ignoreFailures)
- A constructor
- Parameters:
ignoreFailures
- true value means failed branches are ignored. If all branches
failed. First failure is reported.
Any
public Any()
- A constructor. By default
Any
does not ignore failures.
finallyDo
protected Promise<?> finallyDo()
throws Throwable
- This callback is executed after first action is finshed and before result
is returned returned.
- Returns:
- promise or null
- Throws:
Throwable
promise
public Promise<Object> promise()
- Returns:
- a result promise
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.