|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.microedition.util.SimpleCancellableTask
public class SimpleCancellableTask
A simple implementation of CancellableTask
. This implementation uses a supplied
Runnable object, which is being run when this task starts.
Constructor Summary | |
---|---|
SimpleCancellableTask()
Creates a new instance of SimpleCancellableTask |
|
SimpleCancellableTask(Executable executable)
Creates a new instance of SimpleCancellableTask with supplied executable object |
Method Summary | |
---|---|
boolean |
cancel()
Cancel this task. |
java.lang.String |
getFailureMessage()
Gets the failure message of the failed task. |
boolean |
hasFailed()
Checks whether the task has failed. |
void |
run()
Implementation of run method. |
void |
setExecutable(Executable executable)
Sets the executable object for this task. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleCancellableTask()
public SimpleCancellableTask(Executable executable)
executable
- Executable to be used for execution.Method Detail |
---|
public void setExecutable(Executable executable)
executable
- Executable to be used for execution.public boolean cancel()
cancel
in interface CancellableTask
public java.lang.String getFailureMessage()
run()
method), this methods returns a message from this exception.
getFailureMessage
in interface CancellableTask
public boolean hasFailed()
execute()
method of the supplied Executable
object has
thrown an exception.
hasFailed
in interface CancellableTask
public void run()
execute()
method
from the suplied Executable
object.
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |