1 |
mojays |
2 |
package appl.data; |
2 |
|
|
|
3 |
|
|
import java.io.Serializable; |
4 |
|
|
|
5 |
mojays |
114 |
import de.appl.data.LoadingException; |
6 |
|
|
|
7 |
mojays |
2 |
/** |
8 |
|
|
* A class that automatically loads a specified object and returns it, as soon |
9 |
|
|
* as the {@link #load()} method is invoked. It is the counterpart of {@link DataUnloader}. |
10 |
|
|
* |
11 |
|
|
* @author Dominik Appl |
12 |
|
|
* @see DataUnloader |
13 |
|
|
*/ |
14 |
|
|
public interface DataLoader extends Serializable { |
15 |
|
|
|
16 |
|
|
/** |
17 |
|
|
* On invocation the data is loaded and returned |
18 |
|
|
* |
19 |
|
|
* @return the newly loaded object |
20 |
|
|
* |
21 |
|
|
* @throws LoadingException if for some reason the data could not |
22 |
|
|
* be loaded |
23 |
|
|
*/ |
24 |
|
|
public Object load() throws LoadingException; |
25 |
|
|
|
26 |
|
|
/** |
27 |
|
|
* @return some general information about the loading class |
28 |
|
|
* (like what the class exactly loads) |
29 |
|
|
* |
30 |
|
|
*/ |
31 |
|
|
public String getLoadInfo(); |
32 |
|
|
|
33 |
|
|
} |