Line | |
---|
1 | package de.ugoe.cs.autoquest.htmlmonitor; |
---|
2 | |
---|
3 | /** |
---|
4 | * <p> |
---|
5 | * convenience interface for all components making up the HTML monitor. All components implement |
---|
6 | * this interface to ensure homogeneity throughout them. A component must first be initialized |
---|
7 | * ({@link #init()}), then started ({@link #start()}) and finally stopped ({@link #stop()}). |
---|
8 | * </p> |
---|
9 | * |
---|
10 | * @author Patrick Harms |
---|
11 | */ |
---|
12 | public interface HtmlMonitorComponent { |
---|
13 | |
---|
14 | /** |
---|
15 | * initializes a component, i.e. it does everything needed to prepare starting the component |
---|
16 | * |
---|
17 | * @throws IllegalStateException thrown if the method was already called before but |
---|
18 | * {@link #stop()} wasn't called yet |
---|
19 | * @throws HtmlMonitorException thrown if the initialization fails, e.g. because needed infos |
---|
20 | * are missing |
---|
21 | */ |
---|
22 | void init() throws IllegalStateException, HtmlMonitorException; |
---|
23 | |
---|
24 | /** |
---|
25 | * starts a component |
---|
26 | * |
---|
27 | * @throws IllegalStateException thrown if {@link #init()} wasn't called yet of if the component |
---|
28 | * is already started through a preceding call to this method |
---|
29 | * @throws HtmlMonitorException thrown if the startup fails, e.g. because needed infos |
---|
30 | * are missing |
---|
31 | */ |
---|
32 | void start() throws IllegalStateException, HtmlMonitorException; |
---|
33 | |
---|
34 | /** |
---|
35 | * stops a component and cleans up any derivate. In the following, {@link #init()} must be |
---|
36 | * callable again. If the component is not initialized or started, nothing must happen. If the |
---|
37 | * component is initialized but not started, the initialization is revoked. |
---|
38 | */ |
---|
39 | void stop(); |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.