|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Progress<T extends Serializable>
Monitor the progress of some lengthly operation, and allows cancelation. This interface makes no assumption about the output device. Additionnaly, this interface provides support for non-fatal warning and exception reports.
All implementations should be multi-thread safe, even the ones that provide feedback to a user interface thread.
| Method Summary | |
|---|---|
void |
onCancel()
Indicates that task should be cancelled. |
void |
onCompleted()
Notifies this listener that the operation has finished. |
void |
onDispose()
Releases any resources used by this listener. |
void |
onExceptionOccurred(Throwable exception)
Reports an exception. |
void |
onNewTask(T task)
Sets the description of the current task being performed. |
void |
onStart()
Notifies this listener that the operation begins. |
void |
onUpdateProgress(float percent)
Notifies this listener of progress in the lengthly operation. |
void |
onWarningOccurred(String source,
String location,
String warning)
Reports a warning. |
| Method Detail |
|---|
void onNewTask(T task)
task - Description of the task being performed, or null if none.void onStart()
void onUpdateProgress(float percent)
percent - The progress as a value between 0 and 100 inclusive.void onCompleted()
void onDispose()
void onCancel()
void onWarningOccurred(String source,
String location,
String warning)
source - Name of the warning source, or null if none. This is typically the
filename in process of being parsed or the URL of the data being processedlocation - Text to write on the left side of the warning message, or null if none.
This is typically the line number where the error occured in the source
file or the feature ID of the feature that produced the messagewarning - The warning message.void onExceptionOccurred(Throwable exception)
exception - The exception to report.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||