KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > propagation > PropagationManager


1 package propagation;
2
3 /**
4  * The PropagationManager interface represents "propagation tree". This is the frontend and logical representation
5  * of the whole network.
6  *
7  * @author y-komori
8  */

9 @org.jboss.cache.pojo.annotation.Replicable
10 public interface PropagationManager {
11    /**
12     * Creates and sets the root <code>Node</code> which has specified RDN to
13     * this propagation tree.
14     *
15     * @param rdn the root <code>Node</code>'s RDN.
16     */

17    public void setRootNode(String JavaDoc rdn);
18
19    /**
20     * Creates a new <code>Node</code> object and register to the propagation
21     * tree.
22     *
23     * @param fdn the new <code>Node</code>'s FDN
24     * @param rdn the new <code>Node</code>'s RDN
25     * @return created <code>Node</code> object
26     */

27    public Node createNode(String JavaDoc fdn, String JavaDoc rdn);
28
29    /**
30     * Creates and appends a new <code>Node</code> to this propagation tree as
31     * the specified <code>Node</code>'s children.
32     *
33     * @param parentFdn the parent <code>Node</code>'s FDN
34     * @param rdn the new <code>Node</code>'s RDN
35     */

36    public void addNode(String JavaDoc parentFdn, String JavaDoc rdn);
37
38    /**
39     * Sets the <code>Node</code> object to the lower <code>Node</code>
40     * object as a upper node.
41     *
42     * @param upperFdn the upper <code>Node</code>'s FDN
43     * @param lowerFdn the lower <code>Node</code>'s FDN
44     */

45    public void setUpperNode(String JavaDoc upperFdn, String JavaDoc lowerFdn);
46
47    /**
48     * Creates and appends a new <code>StateItem</code> to the Node identified
49     * by the specified parent FDN and item ID.
50     *
51     * @param parentFdn the parent <code>Node</code>'s FDN
52     * @param itemId the new <code>StateItem</code>'s item ID
53     * @param name a logical name
54     * @param defaultState the new <code>StateItem</code>'s default state.
55     */

56    public void addStateItem(String JavaDoc parentFdn, long itemId, String JavaDoc name, long defaultState);
57
58    /**
59     * Finds the <code>Node</code> identified by the specified FDN.
60     * If it can't find the specified <code>Node</code>, returns
61     * <code>null</code>.
62     *
63     * @param fdn the target <code>Node</code>'s FDN.
64     * @return found <code>Node</code> object or <code>null</code>.
65     */

66    public Node findNode(String JavaDoc fdn);
67
68    /**
69     * Changes the <code>Node</code>'s state to the specified new state.
70     * The target Node is identified by the specified FDN and item ID.<br />
71     *
72     * @param fdn the target <code>Node</code>'s FDN.
73     * @param itemId the target item ID.
74     * @param newState a new state to change.
75     */

76    public void stateChange(String JavaDoc fdn, long itemId, long newState);
77
78    /**
79     * Prints the propagation tree's all <code>Node</code>'s and state.
80     */

81    public void printNodes();
82
83    /**
84     * Prints the propagation tree from the <code>Node</code> identified by
85     * the specified FDN.<br />
86     *
87     * @param fdn the top <code>Node</code>'s FDN
88     */

89    public void printNodes(String JavaDoc fdn);
90 }
91
Popular Tags