org.cyberlab.local.activity.task
Class AbstractWorkerTask<Params,Result>
java.lang.Object
org.cyberlab.local.activity.task.AbstractWorkerTask<Params,Result>
- Type Parameters:
Params
- The parameters fed to the doInBackground methodResult
- The returned result from the doInBackground method
- Direct Known Subclasses:
- AbstractCreateModelTask, AbstractMatchTask, CreateUnknownTask
public abstract class AbstractWorkerTask<Params,Result>
- extends
Abstract task for common handling of tasks performing image feature extraction, model creation and matching. Classes extending
this can be handled by the TaskManager.
- Author:
- Mats-Gøran Karlsen
Method Summary |
void |
attach(AbstractGeneralActivity<?> activity)
Method is called from the TaskManager attaching this task to an activity |
void |
detach()
Tell the task that the acitivity owning it is unavailable. |
int |
getId()
Retrieve the unique id of this task |
protected void |
onProgressUpdate(java.lang.Integer... values)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mActivity
protected AbstractGeneralActivity<?> mActivity
threadId
protected final int threadId
AbstractWorkerTask
public AbstractWorkerTask(AbstractGeneralActivity<?> activity,
int uniqueID)
getId
public int getId()
- Retrieve the unique id of this task
- Returns:
attach
public void attach(AbstractGeneralActivity<?> activity)
- Method is called from the TaskManager attaching this task to an activity
- Parameters:
activity
- The activity that wishes to own this task
detach
public void detach()
- Tell the task that the acitivity owning it is unavailable. The task will wait for the activity to attach it again.
Method is called from TaskManager.
onProgressUpdate
protected void onProgressUpdate(java.lang.Integer... values)