2016-10-25 12:46:50 +02:00
|
|
|
package org.gcube.data.analysis.dataminermanagercl.server.monitor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Defines a listener for operation progress.
|
|
|
|
*
|
2017-05-10 12:44:22 +02:00
|
|
|
* @author Giancarlo Panichi
|
|
|
|
*
|
2016-10-25 12:46:50 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface DMMonitorListener {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Called when the operation is starting.
|
|
|
|
*/
|
|
|
|
public void accepted();
|
2017-05-10 12:44:22 +02:00
|
|
|
|
2016-10-25 12:46:50 +02:00
|
|
|
/**
|
|
|
|
* Called when there is a progress for the operation.
|
2017-05-10 12:44:22 +02:00
|
|
|
*
|
2016-10-25 12:46:50 +02:00
|
|
|
*/
|
|
|
|
public void cancelled();
|
2017-05-10 12:44:22 +02:00
|
|
|
|
2016-10-25 12:46:50 +02:00
|
|
|
/**
|
|
|
|
* Called when the operation is complete
|
2017-05-10 12:44:22 +02:00
|
|
|
*
|
|
|
|
* @param percentage
|
|
|
|
* percentage
|
2016-10-25 12:46:50 +02:00
|
|
|
*/
|
|
|
|
public void complete(double percentage);
|
2017-05-10 12:44:22 +02:00
|
|
|
|
2016-10-25 12:46:50 +02:00
|
|
|
/**
|
|
|
|
* Called when the operation is failed
|
2017-05-10 12:44:22 +02:00
|
|
|
*
|
|
|
|
* @param message
|
|
|
|
* message
|
|
|
|
* @param exception
|
|
|
|
* exception
|
2016-10-25 12:46:50 +02:00
|
|
|
*/
|
|
|
|
public void failed(String message, Exception exception);
|
2017-05-10 12:44:22 +02:00
|
|
|
|
2016-10-25 12:46:50 +02:00
|
|
|
/**
|
|
|
|
* Called when the operation is running
|
2017-05-10 12:44:22 +02:00
|
|
|
*
|
|
|
|
* @param percentage
|
|
|
|
* percentage
|
2016-10-25 12:46:50 +02:00
|
|
|
*/
|
|
|
|
public void running(double percentage);
|
2017-05-10 12:44:22 +02:00
|
|
|
|
2016-10-25 12:46:50 +02:00
|
|
|
}
|