blob: f3ef627fdc821db73b87f65027ce11b22fec705e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
/*****************************************************************************
* Copyright (c) 2014 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.migration.rsa.internal.schedule;
/**
* Minimal API for schedulable tasks
*
* @author Camille Letavernier
*
*/
public interface Schedulable {
/**
*
* @return true if the task is complete
*/
public boolean isComplete();
/**
*
* @return the label of the tasks
*/
public String getName();
/**
* Starts the task. The implementation should start in a separate thread (e.g. via a Job)
*/
public void start();
/**
* Requests the task to cancel. The task may not be canceled immediately; invoker should wait
* for isComplete() to return true after invoking this method
*/
public void cancel();
}
|