net.sf.asyncobjects.util
Class AsyncProcess.ProcessWhen<I>
java.lang.Object
net.sf.asyncobjects.When<I,Void>
net.sf.asyncobjects.util.AsyncProcess.ProcessWhen<I>
- Type Parameters:
I
- promise input
- All Implemented Interfaces:
- ExplicitSharing
- Enclosing class:
- AsyncProcess<R>
protected abstract class AsyncProcess.ProcessWhen<I>
- extends When<I,Void>
A utility when variant that fails process (using
AsyncProcess.failure(Throwable)
) if promise is smashed or body
is smashed. Note that AsyncProcess.success(Object)
should still
called explicitly.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncProcess.ProcessWhen
public AsyncProcess.ProcessWhen(Promise<I> p)
- A constructor
- Parameters:
p
- a promiose
AsyncProcess.ProcessWhen
public AsyncProcess.ProcessWhen(I ao)
- A consctoructor,
- Parameters:
ao
- a reference to asynchronous object
smashed
protected Promise<Void> smashed(Throwable problem)
throws Throwable
- This imlementation just fails process using
AsyncProcess.failure(Throwable)
method.
- Overrides:
smashed
in class When<I,Void>
- Parameters:
problem
- a problem that broken a promise.
- Returns:
- a value becomes curren result of promise
- Throws:
Throwable
- if there is a problem- See Also:
When.smashed(java.lang.Throwable)
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.