ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/conient/uk/org/iscream/cms/conient/datacomponents/DataComponent.java
Revision: 1.8
Committed: Sun Mar 18 14:43:39 2001 UTC (23 years, 2 months ago) by ajm
Branch: MAIN
CVS Tags: PROJECT_COMPLETION
Changes since 1.7: +9 -8 lines
Log Message:
Lots of changes to allow components to have multiple attributes.

This now means that data for memory/swap/disks/services are all correctly updated on the display the first time they get data.  Rather than before, when they had to have at least two packets to gain all the data and would be slightly wrong.

Now it is all fine and dandy...

File Contents

# Content
1 //---PACKAGE DECLARATION---
2 package uk.org.iscream.conient.datacomponents;
3
4 //---IMPORTS---
5 import uk.org.iscream.util.XMLPacket;
6
7 /**
8 * This interface is used by all
9 * components that will be used to display
10 * inbound data. The HostDisplayPanel class
11 * uses it as a generic way to tell a specific
12 * class that holds data to update its data with
13 * a given packet.
14 *
15 * A related class is the VisibleDataComponent
16 * abstract class, this is specifically for components
17 * that will display data and thus implements this
18 * interface.
19 *
20 * @author $Author: ajm4 $
21 * @version $Id: DataComponent.java,v 1.7 2001/03/15 01:05:46 ajm4 Exp $
22 */
23 public interface DataComponent {
24
25 //---FINAL ATTRIBUTES---
26
27 /**
28 * The current CVS revision of this class
29 */
30 public final String REVISION = "$Revision: 1.7 $";
31
32 //---STATIC METHODS---
33
34 //---CONSTRUCTORS---
35
36 //---PUBLIC METHODS---
37
38 //---PRIVATE METHODS---
39
40 //---ACCESSOR/MUTATOR METHODS---
41
42 /**
43 * This takes an XMLPacket so that the reading
44 * component can extract the data it needs to update
45 * the display.
46 *
47 * @param packet the packet
48 * @throws DataFormatException if there was a problem converting the data for display
49 */
50 public void setValue(XMLPacket packet) throws DataFormatException;
51
52 /**
53 * Returns the string showing the packet
54 * attribute that the component is looking after
55 *
56 * @return the packet reference
57 */
58 public String getPacketAttribute();
59
60 //---ATTRIBUTES---
61
62 //---STATIC ATTRIBUTES---
63
64 }