KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > propagation > Node


1 package propagation;
2
3 import java.util.List JavaDoc;
4
5 /**
6  * The <code>Node</code> interface represents a physical or logical target to
7  * supervise.<br />
8  * <code>Node</code>s mean target sensor, area and so on. Each node has one
9  * summary <code>StateItem</code> and several physical <code>StateItem</code>s.<br />
10  * The summary <code>StateItem</code> represents the <code>Node</code>'s summary
11  * state, e.g., overall status. Physical <code>StateItem</code>s represents the <code>Node</code>'s
12  * individual states.
13  *
14  * @author y-komori
15  */

16 @org.jboss.cache.pojo.annotation.Replicable
17 public interface Node {
18
19    /**
20     * Sets the RDN (relative distinguished name) to this node.<br />
21     *
22     * @param rdn the RDN to set.
23     */

24    public void setNodeRDN(String JavaDoc rdn);
25
26    /**
27     * Returns this node's RDN.<br />
28     *
29     * @return this node's RDN.
30     */

31    public String JavaDoc getNodeRDN();
32
33    /**
34     * Sets the FDN to this node.<br />
35     * The FDN is fully distinguished name of this node. FDN indicates where the
36     * node is in the propagation tree. A node's FDN is made of the parent
37     * node's FDN and it's own RDN.
38     * <p/>
39     * For example, if
40     * a parent node's FDN is <code>root.foo</code>
41     * , this node's RDN is <code>bar</code> then
42     * this node's FDN is <ocde>root.foo.bar</code>
43     *
44     * @param fdn the FDN to set.
45     */

46    public void setNodeFDN(String JavaDoc fdn);
47
48    /**
49     * Returns this node's FDN.
50     *
51     * @return this node's FDN.
52     */

53    public String JavaDoc getNodeFDN();
54
55    /**
56     * Appends the specified child node to this node.
57     * Note that each node can have multiple child nodes.
58     *
59     * @param child a child node to be appended to this node.
60     */

61    public void addChildNode(Node child);
62
63    /**
64     * Returns this node's child nodes List.
65     *
66     * @return this node's child nodes List.
67     */

68    public List JavaDoc getChildren();
69
70    /**
71     * Appends the specified <code>Node</code> as an upper node. An upper node is like a logical parent,
72     * and it can have many upper nodes.
73     *
74     * @param upperNode a <code>Node</code> object to set as an upper node.
75     */

76    public void addUpperNode(Node upperNode);
77
78    /**
79     * Returns this node's upper nodes List.<br />
80     *
81     * @return this node's upper nodes List.
82     */

83    public List JavaDoc getUpperNodes();
84
85    /**
86     * Sets the specified node to this node as a parent node.
87     * Each node can have only one node as a parent node. If any parent node
88     * isn't be set, the node is treated as a root node.
89     *
90     * @param parent a node to be set as a parent node.
91     */

92    public void setParentNode(Node parent);
93
94    /**
95     * Returns this node's patent node.<br />
96     * If this node hasn't any parent node, returns null.
97     *
98     * @return this node's parent node
99     */

100    public Node getParentNode();
101
102    /**
103     * Appends the specified <code>StateItem</code> object to this node.
104     * Each node can have multiple <code>StateItem</code> objects.
105     *
106     * @param stateItem a <code>StateItem</code> object to be appended to this node.
107     */

108    public void addStateItem(StateItem stateItem);
109
110    /**
111     * Sets the specified <code>StateItem</code> object to this node as a
112     * summary state.<br />
113     * Summary <code>StateItem</code> object is a special
114     * <code>StateItem</code> object which indicates this node's summary (e.g., overall status). Each
115     * node can have only one <code>StateItem</code> object as a summary
116     * state.
117     *
118     * @param stateItem a StateItem object to be set as a summary state.
119     */

120    public void setSummaryStateItem(StateItem stateItem);
121
122    /**
123     * Returns this node's summary <code>StateItem</code> object.
124     * If this node hasn't any summary StateItem object which is set using
125     * <code>setSummaryStateItem()</code>, returns null.
126     *
127     * @return a summary <code>StateItem</code> object.
128     */

129    public StateItem getSummaryStateItem();
130
131    /**
132     * Returns this node's <code>StateItem</code> object's list.
133     * Notice that the summary <code>StateItem</code> isn't included in the
134     * returned list.
135     *
136     * @return this node's <code>StateItem</code> object's list.
137     */

138    public List JavaDoc getStateItems();
139
140    /**
141     * Returns the <code>StateItem</code> object which has specified item ID.
142     * Returns <code>null</code> if the <code>StateItem</code> is not found
143     * there.
144     *
145     * @param itemId the StateItem's item ID to find.
146     * @return the <code>StateItem</code> object, or <code>null</code> if
147     * none.
148     */

149    public StateItem findStateItem(long itemId);
150
151    /**
152     * Sets the specifies <code>PropagationRule</code> object to this node.
153     *
154     * @param rule a PropagationRule object to be set.
155     */

156    public void setPropagationRule(PropagationRule rule);
157
158    /**
159     * Returns this node's <code>PropagationRule</code> object. Returns
160     * <code>null</code> if this node has no <code>PropagationRule</code>
161     * object.
162     *
163     * @return this node's <code>PropagationRule</code> object, or
164     * <code>null</code> if none.
165     */

166    public PropagationRule getPropagationRule();
167 }
168
Popular Tags