|
juife v0.1a |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Task<R>
Defines a task that can be queued for execution in a
TaskQueue
or in a TaskList
.
TaskQueue
,
TaskList
Method Summary | |
---|---|
void |
addTaskListener(TaskListener l)
Registers the specified listener for receiving event messages. |
boolean |
done()
Determines whether the task has finished execution. |
boolean |
doneWithErrors()
Determines whether the task has finished its execution successfully. |
java.lang.String |
getDescription()
Gets a short description about this task. |
int |
getErrorCode()
Gets an appropriate error code identifying the failure of the task. |
java.lang.String |
getErrorMessage()
Gets an appropriate error message when the task fails. |
R |
getResult()
Gets the result of the task execution. |
java.lang.String |
getTitle()
Gets the title of this task. |
void |
invoke()
Starts the execution of this task. |
void |
invokeAndWait()
Starts the execution of this task. |
boolean |
isStarted()
Determines whether the task has been started. |
void |
removeTaskListener(TaskListener l)
Removes the specified listener. |
void |
setTitle(java.lang.String title)
Sets the title of this task. |
void |
stop()
Terminates the execution of this task |
Method Detail |
---|
void addTaskListener(TaskListener l)
l
- The TaskListener
to register.void removeTaskListener(TaskListener l)
l
- The TaskListener
to remove.boolean done()
true
if the task has finished execution,
false
otherwise.boolean doneWithErrors()
true
if the task has not finished its
execution successfully; false
otherwiseint getErrorCode()
doneWithErrors()
java.lang.String getErrorMessage()
doneWithErrors()
R getResult()
R
instance providing the result of the task execution.java.lang.String getDescription()
void invoke()
invokeAndWait()
. Notice that every task can be started only once.
java.lang.IllegalStateException
- if the task has been started already.invokeAndWait()
void invokeAndWait()
invoke()
if you don't want this method to wait until the end of the task execution.
Notice that every task can be started only once.
java.lang.IllegalStateException
- if the task has been started already.invoke()
boolean isStarted()
true
if the task is already started and false
if the task is not started yet.java.lang.String getTitle()
void setTitle(java.lang.String title)
title
- Specifies the title text of this task.void stop()
|
juife v0.1a |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2005 Grigor Iliev. All rights reserved. |