|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.parser.util.AsyncTask
The AsyncTask
is a part of a basic API to allow scheduling asynchronous tasks that support cancelling while the task is running. It is recommended that JSR 166 be used when it becomes available as part of the JDK later.
Field Summary | |
protected static java.lang.String |
CANCELLED_RESULT Tasks that are cancelled successfully in-progress should return this cancelled result, so that the task status can be updated accordingly. |
static int |
STATUS_CANCELLED Constant for cancelled status. |
static int |
STATUS_COMPLETED Constant for completed successfully status. |
static int |
STATUS_FAILED Constant for completed w/ failed status due to RuntimeException. |
static int |
STATUS_READY Constant for ready-to-run status. |
static int |
STATUS_RUNNING Constant for currently running status. |
Constructor Summary | |
protected |
AsyncTask() Set up the AsyncTask in ready-to-run mode. |
Method Summary | |
java.lang.Object |
getResult() Fetch the completed result of the task (if any). |
int |
getStatus() Fetches the current status of the task. |
protected void |
requestCancel() Request to cancel the task. |
protected abstract void |
requestCancelImpl() Request to cancel the task in-progress, to be implemented by the implementation. |
void |
run() Performs the task. |
protected abstract java.lang.Object |
runImpl() Implementation of the task. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STATUS_READY
public static final int STATUS_RUNNING
public static final int STATUS_COMPLETED
public static final int STATUS_FAILED
public static final int STATUS_CANCELLED
protected static final java.lang.String CANCELLED_RESULT
Constructor Detail |
protected AsyncTask()
Method Detail |
public final int getStatus()
public final void run()
run
in interface java.lang.Runnable
protected abstract java.lang.Object runImpl()
protected final void requestCancel()
protected abstract void requestCancelImpl()
public final java.lang.Object getResult()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.