|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.geosolutions.tools.commons.listener.ProgressList<T>
T - the serializable type for taskspublic final class ProgressList<T extends Serializable>
Thread-safe implementation of list of Progress Listener can be used to propagate events to all the registered list of progress listeners
DefaultProgress| Constructor Summary | |
|---|---|
ProgressList()
|
|
| Method Summary | |
|---|---|
boolean |
addListener(Progress<T> listener)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProgressList()
| Method Detail |
|---|
public boolean addListener(Progress<T> listener)
listener - the listener to add
Collection.add(Object)public void onNewTask(T task)
Progress
onNewTask in interface Progress<T extends Serializable>task - Description of the task being performed, or null if none.public void onStart()
Progress
onStart in interface Progress<T extends Serializable>public void onUpdateProgress(float percent)
Progress
onUpdateProgress in interface Progress<T extends Serializable>percent - The progress as a value between 0 and 100 inclusive.public void onCompleted()
Progress
onCompleted in interface Progress<T extends Serializable>public void onDispose()
Progress
onDispose in interface Progress<T extends Serializable>public void onCancel()
Progress
onCancel in interface Progress<T extends Serializable>
public void onWarningOccurred(String source,
String location,
String warning)
Progress
onWarningOccurred in interface Progress<T extends Serializable>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.public void onExceptionOccurred(Throwable exception)
Progress
onExceptionOccurred in interface Progress<T extends Serializable>exception - The exception to report.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||