Lines Matching refs:Result
67 * whose result is published on the UI thread. An asynchronous task is defined by 3 generic
68 * types, called <code>Params</code>, <code>Progress</code> and <code>Result</code>,
103 * protected void onPostExecute(Long result) {
104 * showDialog("Downloaded " + result + " bytes");
121 * <li><code>Result</code>, the type of the result of the background
139 * of the asynchronous task are passed to this step. The result of the computation must
150 * computation finishes. The result of the background computation is passed to
197 public abstract class AsyncTask<Params, Progress, Result> {
239 private final WorkerRunnable<Params, Result> mWorker;
240 private final FutureTask<Result> mFuture;
307 mWorker = new WorkerRunnable<Params, Result>() {
308 public Result call() throws Exception {
317 mFuture = new FutureTask<Result>(mWorker) {
334 private void postResultIfNotInvoked(Result result) {
337 postResult(result);
341 private Result postResult(Result result) {
344 new AsyncTaskResult<Result>(this, result));
346 return result;
368 * @return A result, defined by the subclass of this task.
374 protected abstract Result doInBackground(Params... params);
387 * specified result is the value returned by {@link #doInBackground}.</p>
391 * @param result The result of the operation computed by {@link #doInBackground}.
398 protected void onPostExecute(Result result) {
419 * ignores the result. If you write your own implementation, do not call
420 * <code>super.onCancelled(result)</code>.</p>
422 * @param result The result, if any, computed in
429 protected void onCancelled(Result result) {
472 * <p>Calling this method will result in {@link #onCancelled(Object)} being
498 * retrieves its result.
500 * @return The computed result.
507 public final Result get() throws InterruptedException, ExecutionException {
513 * to complete, and then retrieves its result.
518 * @return The computed result.
526 public final Result get(long timeout, TimeUnit unit) throws InterruptedException,
559 public final AsyncTask<Params, Progress, Result> execute(Params... params) {
596 public final AsyncTask<Params, Progress, Result> executeOnExecutor(Executor exec,
653 private void finish(Result result) {
655 onCancelled(result);
657 onPostExecute(result);
666 AsyncTaskResult result = (AsyncTaskResult) msg.obj;
669 // There is only one result
670 result.mTask.finish(result.mData[0]);
673 result.mTask.onProgressUpdate(result.mData);
679 private static abstract class WorkerRunnable<Params, Result> implements Callable<Result> {