1 |
/* |
2 |
* i-scream central monitoring system |
3 |
* http://www.i-scream.org |
4 |
* Copyright (C) 2000-2002 i-scream |
5 |
* |
6 |
* This program is free software; you can redistribute it and/or |
7 |
* modify it under the terms of the GNU General Public License |
8 |
* as published by the Free Software Foundation; either version 2 |
9 |
* of the License, or (at your option) any later version. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
19 |
*/ |
20 |
|
21 |
//---PACKAGE DECLARATION--- |
22 |
package uk.org.iscream.cms.conient.datacomponents; |
23 |
|
24 |
//---IMPORTS--- |
25 |
import uk.org.iscream.cms.util.XMLPacket; |
26 |
|
27 |
/** |
28 |
* This interface is used by all |
29 |
* components that will be used to display |
30 |
* inbound data. The HostDisplayPanel class |
31 |
* uses it as a generic way to tell a specific |
32 |
* class that holds data to update its data with |
33 |
* a given packet. |
34 |
* |
35 |
* A related class is the VisibleDataComponent |
36 |
* abstract class, this is specifically for components |
37 |
* that will display data and thus implements this |
38 |
* interface. |
39 |
* |
40 |
* @author $Author: tdb $ |
41 |
* @version $Id: DataComponent.java,v 1.12 2003/02/05 19:35:04 tdb Exp $ |
42 |
*/ |
43 |
public interface DataComponent { |
44 |
|
45 |
//---FINAL ATTRIBUTES--- |
46 |
|
47 |
/** |
48 |
* The current CVS revision of this class |
49 |
*/ |
50 |
public final String REVISION = "$Revision: 1.12 $"; |
51 |
|
52 |
//---STATIC METHODS--- |
53 |
|
54 |
//---CONSTRUCTORS--- |
55 |
|
56 |
//---PUBLIC METHODS--- |
57 |
|
58 |
//---PRIVATE METHODS--- |
59 |
|
60 |
//---ACCESSOR/MUTATOR METHODS--- |
61 |
|
62 |
/** |
63 |
* This takes an XMLPacket so that the reading |
64 |
* component can extract the data it needs to update |
65 |
* the display. |
66 |
* |
67 |
* @param packet the packet |
68 |
* @throws DataFormatException if there was a problem converting the data for display |
69 |
*/ |
70 |
public void setValue(XMLPacket packet) throws DataFormatException; |
71 |
|
72 |
/** |
73 |
* Returns the string showing the packet |
74 |
* attribute that the component is looking after |
75 |
* |
76 |
* @return the packet reference |
77 |
*/ |
78 |
public String getPacketAttribute(); |
79 |
|
80 |
//---ATTRIBUTES--- |
81 |
|
82 |
//---STATIC ATTRIBUTES--- |
83 |
|
84 |
} |