|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asyncobjects.AsyncAction<T>
T
- a value typepublic abstract class AsyncAction<T>
Asynchronous action. This utility class allows creating temporary vat locally and communicate with objects in some other vat.
Constructor Summary | |
---|---|
AsyncAction()
|
Method Summary | |
---|---|
T |
doInCurrentThread()
Execute this action in the current thread. |
T |
doInCurrentThread(ThreadBasedRunner runner)
Execute this action in the current thread. |
Promise<T> |
doInOtherVat(Vat vat)
Execute action in context of other vat. |
Promise<T> |
executeLater()
Execute action in current vat. |
Promise<T> |
executeNow()
Execute action in current vat. |
void |
executeNow(AResolver<? super T> resolver)
Execute action in current vat. |
abstract Promise<? extends T> |
run()
This abstract method is basically "main" for vat. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AsyncAction()
Method Detail |
---|
public abstract Promise<? extends T> run() throws Throwable
Throwable
- if any problem occurspublic final Promise<T> doInOtherVat(Vat vat)
vat
- a vat where body of action should be executed.
public final Promise<T> executeNow()
public final void executeNow(AResolver<? super T> resolver)
resolver
- a resolver for actionpublic final Promise<T> executeLater()
public T doInCurrentThread() throws InvocationTargetException
InvocationTargetException
- if promise has been smashed.public T doInCurrentThread(ThreadBasedRunner runner) throws InvocationTargetException
runner
- a runner to use for execution. The runner must be in the
VatRunner.VatRunnerState.NOT_STARTED
state.
InvocationTargetException
- if promise has been smashed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |