1 /*
2 * Copyright 2007 Sebastien Brunot (sbrunot@gmail.com)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package net.sourceforge.buildmonitor.monitors;
17
18 import java.net.URI;
19
20 /**
21 * TODO: DOCUMENTS ME !
22 * Monitor instance may be interrupted at any time by the build monitor main thread in
23 * order to immediately take into account a change in the configuration.
24 * @author sbrunot
25 *
26 */
27 public interface Monitor extends Runnable
28 {
29 /**
30 * stop the monitor.
31 */
32 public void stop();
33
34 /**
35 * Return the name of the monitored build system (to be used in tray icon popup menu entries)
36 * @return the name of the monitored build system
37 */
38 public String getMonitoredBuildSystemName();
39
40 /**
41 * Return an URI to the main page of the monitored build system
42 */
43 public URI getMainPageURI();
44
45 /**
46 * Return an URI to the dedicated page of a build on the monitored build system
47 * @param theIdOfTheBuild the Id of the build (as in the BuildReport)
48 * @return an URI to the dedicated page of a build on the monitored build system
49 */
50 public URI getBuildURI(String theIdOfTheBuild);
51
52 /**
53 * Get the String to display as the first line of the Tooltip of the system tray icon.
54 * @return the String to display as the first line of the Tooltip of the system tray icon.
55 */
56 public String getSystemTrayIconTooltipHeader();
57
58 /**
59 * Display the options dialog on screen.
60 */
61 public void displayOptionsDialog();
62 }