1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package de.fu_berlin.ties;
23
24 import java.io.IOException;
25
26 /***
27 * Classes implementing this interface announce that they should be closed
28 * for releasing all resources and stopping any background activity.
29 * The creator of a closeable instance is responsible for calling the
30 * {@link #close(int)} when the instance is no longer in use.
31 *
32 * @author Christian Siefkes
33 * @version $Revision: 1.7 $, $Date: 2006/10/21 16:03:52 $, $Author: siefkes $
34 */
35 public interface Closeable {
36
37 /***
38 * Closes this instance, releasing all resources and stopping any
39 * background threads.
40 *
41 * @param errorCount the number of errors (exceptions) that occurred during
42 * calls to this instance (0 if none)
43 * @throws IOException if an I/O error occurs
44 * @throws ProcessingException if an error occurs during processing any
45 * remaining input
46 */
47 void close(final int errorCount) throws IOException, ProcessingException;
48
49 }