3 * Copyright (C) 2015 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.io
.Serializable
;
13 import java
.util
.UUID
;
15 import eu
.etaxonomy
.cdm
.common
.monitor
.IRemotingProgressMonitor
;
16 import eu
.etaxonomy
.cdm
.common
.monitor
.RemotingProgressMonitorThread
;
20 * Service interface to manage progress monitors
26 public interface IProgressMonitorService
{
29 * Registers new remoting progress monitor
31 * @return uuid of remoting monitor
33 public UUID
registerNewRemotingMonitor(RemotingProgressMonitorThread monitorThread
);
37 * Return remoting monitor corresponding to give uuid
39 * @param uuid of remoting monitor
40 * @return remoting monitor
42 public IRemotingProgressMonitor
getRemotingMonitor(UUID uuid
);
45 * Sets the cancel flag to true for the monitor corresponding to the
48 * @param uuid of remoting monitor
50 public void cancel(UUID uuid
);
53 * Interrupt thread corresponding to remoting monitor with
56 * @param uuid of remoting monitor
58 public void interrupt(UUID uuid
);
61 * Checks whether thread corresponding to remoting monitor with
62 * given uuid is currently in progress
64 * @param uuid of remoting monitor
65 * @return true if corresponding thread is in progres, o/w false
67 public boolean isMonitorThreadRunning(UUID uuid
);
69 public void setFeedback(UUID uuid
, Serializable feedback
);