KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > group > topology > TopologyGroup


1 /*
2  * Created on Mar 16, 2004
3  */

4 package org.objectweb.proactive.core.group.topology;
5
6 import org.objectweb.proactive.core.group.Group;
7 import org.objectweb.proactive.core.group.ProxyForGroup;
8 import org.objectweb.proactive.core.mop.ConstructionOfReifiedObjectFailedException;
9
10
11 /**
12  * Topologies are groups. They just give special acces to their members or (sub)groups members.
13  *
14  * @author Laurent Baduel
15  */

16 public abstract class TopologyGroup extends ProxyForGroup {
17
18     /**
19      * Constructor : a Topology is build with a group with the specified size
20      * @param g - the group used a base for the new group (topology)
21      * @param size - the number of member of g used to build the topology
22      * @throws ConstructionOfReifiedObjectFailedException
23      */

24     public TopologyGroup(Group g, int size)
25         throws ConstructionOfReifiedObjectFailedException {
26         super(g.getTypeName());
27         for (int i = 0; i < size; i++) {
28             this.add(g.get(i));
29         }
30     }
31 }
32
Popular Tags