2 * Copyright (C) 2015 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
9 package eu
.etaxonomy
.cdm
.api
.service
;
11 import java
.io
.Serializable
;
12 import java
.util
.UUID
;
14 import eu
.etaxonomy
.cdm
.common
.monitor
.IRemotingProgressMonitor
;
15 import eu
.etaxonomy
.cdm
.common
.monitor
.RemotingProgressMonitorThread
;
19 * Service interface to manage progress monitors
25 public interface IProgressMonitorService
{
28 * Registers new remoting progress monitor
30 * @return uuid of remoting monitor
32 public UUID
registerNewRemotingMonitor(RemotingProgressMonitorThread monitorThread
);
36 * Return remoting monitor corresponding to give uuid
38 * @param uuid of remoting monitor
39 * @return remoting monitor
41 public IRemotingProgressMonitor
getRemotingMonitor(UUID uuid
);
44 * Sets the cancel flag to true for the monitor corresponding to the
47 * @param uuid of remoting monitor
49 public void cancel(UUID uuid
);
52 * Interrupt thread corresponding to remoting monitor with
55 * @param uuid of remoting monitor
57 public void interrupt(UUID uuid
);
60 * Checks whether thread corresponding to remoting monitor with
61 * given uuid is currently in progress
63 * @param uuid of remoting monitor
64 * @return true if corresponding thread is in progres, o/w false
66 public boolean isMonitorThreadRunning(UUID uuid
);
68 public void setFeedback(UUID uuid
, Serializable feedback
);