|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openide.util.Task org.openide.util.RequestProcessor.Task
The task describing the request sent to the processor. Cancellable since 4.1.
Field Summary |
Fields inherited from class org.openide.util.Task |
EMPTY |
Method Summary | |
boolean |
cancel()
Removes the task from the queue. |
int |
getDelay()
Getter for amount of millis till this task is started. |
int |
getPriority()
Current priority of the task. |
void |
run()
Start the task. |
void |
schedule(int delay)
(Re-)schedules a task to run in the future. |
void |
setPriority(int priority)
Changes the priority the task will be performed with. |
String |
toString()
|
void |
waitFinished()
This method is an implementation of the waitFinished method in the RequestProcessor.Task. |
boolean |
waitFinished(long timeout)
Enhanced reimplementation of the Task.waitFinished(long)
method. |
Methods inherited from class org.openide.util.Task |
addTaskListener, isFinished, notifyFinished, notifyRunning, removeTaskListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public void run()
Task
Task.notifyFinished()
.
Subclasses may override this method, but they
then need to call Task.notifyFinished()
explicitly.
Note that this call runs synchronously, but typically the creator of the task will call this method in a separate thread.
public int getDelay()
public void schedule(int delay)
delay
- time in milliseconds to wait (starting from now)public boolean cancel()
cancel
in interface Cancellable
public int getPriority()
public void setPriority(int priority)
public void waitFinished()
waitFinished
in class Task
public boolean waitFinished(long timeout) throws InterruptedException
Task.waitFinished(long)
method. The added semantic is that if one calls this method from
another task of the same processor, and the task has not yet been
executed, the method will immediatelly detect that and throw
InterruptedException
to signal that state.
waitFinished
in class Task
timeout
- the amount of time to wait
InterruptedException
- if waiting has been interrupted or if
the wait cannot succeed due to possible deadlock collisionpublic String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |