1
|
/**
|
2
|
* Copyright (C) 2015 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.service;
|
10
|
|
11
|
import java.io.Serializable;
|
12
|
import java.util.UUID;
|
13
|
|
14
|
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
|
15
|
import eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread;
|
16
|
|
17
|
/**
|
18
|
* Service interface to manage progress monitors
|
19
|
*
|
20
|
* @author cmathew
|
21
|
* @since 14 Oct 2015
|
22
|
*/
|
23
|
public interface IProgressMonitorService {
|
24
|
|
25
|
/**
|
26
|
* Registers new remoting progress monitor
|
27
|
*
|
28
|
* @return uuid of remoting monitor
|
29
|
*/
|
30
|
public UUID registerNewRemotingMonitor(RemotingProgressMonitorThread monitorThread);
|
31
|
|
32
|
|
33
|
/**
|
34
|
* Return remoting monitor corresponding to give uuid
|
35
|
*
|
36
|
* @param uuid of remoting monitor
|
37
|
* @return remoting monitor
|
38
|
*/
|
39
|
public IRemotingProgressMonitor getRemotingMonitor(UUID uuid);
|
40
|
|
41
|
/**
|
42
|
* Sets the cancel flag to true for the monitor corresponding to the
|
43
|
* given uuid
|
44
|
*
|
45
|
* @param uuid of remoting monitor
|
46
|
*/
|
47
|
public void cancel(UUID uuid);
|
48
|
|
49
|
/**
|
50
|
* Interrupt thread corresponding to remoting monitor with
|
51
|
* given uuid
|
52
|
*
|
53
|
* @param uuid of remoting monitor
|
54
|
*/
|
55
|
public void interrupt(UUID uuid);
|
56
|
|
57
|
/**
|
58
|
* Checks whether thread corresponding to remoting monitor with
|
59
|
* given uuid is currently in progress
|
60
|
*
|
61
|
* @param uuid of remoting monitor
|
62
|
* @return true if corresponding thread is in progres, o/w false
|
63
|
*/
|
64
|
public boolean isMonitorThreadRunning(UUID uuid);
|
65
|
|
66
|
public void setFeedback(UUID uuid, Serializable feedback);
|
67
|
|
68
|
}
|