roboguice.util
Class SafeAsyncTask.Task<ResultT>
java.lang.Object
roboguice.util.SafeAsyncTask.Task<ResultT>
- All Implemented Interfaces:
- Callable<Void>
- Direct Known Subclasses:
- RoboAsyncTask.Task
- Enclosing class:
- SafeAsyncTask<ResultT>
public static class SafeAsyncTask.Task<ResultT>
- extends Object
- implements Callable<Void>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parent
protected SafeAsyncTask<ResultT> parent
handler
protected android.os.Handler handler
SafeAsyncTask.Task
public SafeAsyncTask.Task(SafeAsyncTask parent)
call
public Void call()
throws Exception
- Specified by:
call
in interface Callable<Void>
- Throws:
Exception
doPreExecute
protected void doPreExecute()
throws Exception
- Throws:
Exception
doCall
protected ResultT doCall()
throws Exception
- Throws:
Exception
doSuccess
protected void doSuccess(ResultT r)
throws Exception
- Throws:
Exception
doException
protected void doException(Exception e)
throws Exception
- Throws:
Exception
doFinally
protected void doFinally()
throws Exception
- Throws:
Exception
postToUiThreadAndWait
protected void postToUiThreadAndWait(Callable c)
throws Exception
- Posts the specified runnable to the UI thread using a handler,
and waits for operation to finish. If there's an exception,
it captures it and rethrows it.
- Parameters:
c
- the callable to post
- Throws:
Exception
- on error
Copyright © 2011. All Rights Reserved.