Back to project page khandroid.
The source code is released under:
Apache License
If you think the Android project khandroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.khandroid.kat; /*w ww .j a va 2 s .com*/ public interface KatExecutor<T, U, V> { void execute(KhandroidAsyncTask<T, U, V> task, TaskExecutorListener<U, V> executorListener, T... params ); void execute(KhandroidAsyncTask<T, U, V> task, T... params); boolean cancelTask(boolean mayInterruptIfRunning); boolean isExecuting(); public interface TaskExecutorListener<Progress, Result> { void onTaskPublishProgress(Progress... progress); void onTaskCancelled(); void onTaskCompleted(Result result); void onContinueWithTask(); } /** * Intended to be used then you are interested just in completion of the task. * Such case is when you need to put in async task just some small operation like reading from small file or few DB * rows. * * @author ogre * * @param <Progress> * @param <Result> */ abstract public static class TaskExecutorSimpleListener<Progress, Result> implements TaskExecutorListener<Progress, Result> { @Override public void onTaskCancelled() { //empty } @Override public void onContinueWithTask() { //empty } @Override public void onTaskPublishProgress(Progress... progress) { // empty } } }