package com.laxture.lib.task;

/**
 * Callbacks for various Task life cycle
 */
public final class TaskListener {

    public interface TaskStartListener {
        void onTaskStart();
    }

    public interface TaskProgressUpdatedListener {
        void onTaskProgressUpdated(int totalSize, int currentSize);
    }

    public interface TaskFinishedListener<Result> {
        void onTaskFinished(Result result);
    }

    public interface TaskCancelledListener<Result> {
        void onTaskCancelled(Result result);
    }

    public interface TaskFailedListener<Result> {
        void onTaskFailed(Result result, TaskException ex);
    }

    public interface TaskDataChangedListener {
        /**
         * This callback will be fired when {@link AbstractTask#postDataChanged(int, Object)}
         * is called.
         */
        void onTaskDataChanged(int dataIdentifier, Object changeData);
    }
}

@@ -72,457 +72,1441 @@
 ycle
-%0A */%0Apublic final class TaskListener %7B%0A%0A    public interface TaskStartListener %7B%0A        void onTaskStart();%0A    %7D%0A%0A    public interface TaskProgressUpdatedListener %7B%0A        void onTaskProgressUpdated(int totalSize, int currentSize);%0A    %7D%0A%0A    public interface TaskFinishedListener%3CResult%3E %7B%0A        void onTaskFinished(Result result);%0A    %7D%0A%0A    public interface TaskCancelledListener%3CResult%3E %7B%0A        void onTaskCancelled(Result result);%0A    %7D%0A
+, all these callbacks will be executed%0A * on main ui thread by default/%0A */%0Apublic final class TaskListener %7B%0A%0A    /**%0A     * Fired where task is ready to start in the queue.%0A     */%0A    public interface TaskStartListener %7B%0A        void onTaskStart();%0A    %7D%0A%0A    /**%0A     * Fired where %7B@link AbstractTask#postProgress(int, int)%7D is called.%0A     */%0A    public interface TaskProgressUpdatedListener %7B%0A        void onTaskProgressUpdated(int totalSize, int currentSize);%0A    %7D%0A%0A    /**%0A     * Fired where %7B@link AbstractTask#run()%7D is finished. Parameter result must%0A     * be set by %7B@link AbstractTask#setResult(Object)%7D during %7B@link AbstractTask#run()%7D%0A     *%0A     * @param %3CResult%3E%0A     */%0A    public interface TaskFinishedListener%3CResult%3E %7B%0A        void onTaskFinished(Result result);%0A    %7D%0A%0A    /**%0A     * Fired where %7B@link AbstractTask#cancel()%7D is finished. Parameter result will be provided%0A     * if it's set by %7B@link AbstractTask#setResult(Object)%7D during %7B@link AbstractTask#run()%7D%0A     *%0A     * @param %3CResult%3E%0A     */%0A    public interface TaskCancelledListener%3CResult%3E %7B%0A        void onTaskCancelled(Result result);%0A    %7D%0A%0A    /**%0A     * Fired where %7B@link AbstractTask#run()%7D is finished and %7B@link AbstractTask#getErrorDetails()%7D%0A     * is not empty. Parameter result will be provided if it's set by%0A     * %7B@link AbstractTask#setResult(Object)%7D during %7B@link AbstractTask#run()%7D%0A     *%0A     * @param %3CResult%3E%0A     */
 %0A   
@@ -1627,67 +1627,12 @@
     
-public interface TaskDataChangedListener %7B%0A        /**%0A    
+/**%0A
     
@@ -1722,20 +1722,16 @@
 )%7D%0A     
-    
 * is cal
@@ -1737,21 +1737,147 @@
 lled
+. You could use this callback to handle out-of-sync data in multithread environment
 .%0A     
+*/%0A
     
-*/
+public interface TaskDataChangedListener %7B
 %0A   

Add java doc