1
|
package eu.etaxonomy.cdm.common.monitor;
|
2
|
|
3
|
|
4
|
|
5
|
public interface IRestServiceProgressMonitor extends IProgressMonitor{
|
6
|
|
7
|
public String getTaskName();
|
8
|
|
9
|
public String getSubTask();
|
10
|
|
11
|
/**
|
12
|
* @return the percentage with an accuracy of two decimal digits
|
13
|
* of the work done, or <code>null</code>
|
14
|
* in case the <code>totalWork</code> was <code>0</code>.
|
15
|
*/
|
16
|
public Double getPercentage();
|
17
|
|
18
|
public int getTotalWork();
|
19
|
|
20
|
public double getWorkDone();
|
21
|
|
22
|
/**
|
23
|
* Whether an <code>Exception</code> or another event was causing the monitored process to stop before it has been fully worked.
|
24
|
*
|
25
|
* @return
|
26
|
*/
|
27
|
public boolean isFailed();
|
28
|
|
29
|
/**
|
30
|
* Should be set true if an <code>Exception</code> or another event was causing the monitored process to stop before it has been fully worked.
|
31
|
*
|
32
|
* @param isFailed
|
33
|
*/
|
34
|
public void setIsFailed(boolean isFailed);
|
35
|
|
36
|
public boolean isDone();
|
37
|
|
38
|
public void setDone(boolean isDone);
|
39
|
|
40
|
/**
|
41
|
* Should be set if original request has to be specified
|
42
|
* @param downloadPath
|
43
|
* @return
|
44
|
*/
|
45
|
public void setOrigin(String origin);
|
46
|
|
47
|
public String getOrigin();
|
48
|
|
49
|
|
50
|
}
|