KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > proactive > core > group > ProcessForGroupCreation


1 package org.objectweb.proactive.core.group;
2
3 import org.objectweb.proactive.ProActive;
4
5
6 /**
7  * This class provides multithreading for the creation of active objects.
8  *
9  * @author Laurent Baduel
10  */

11 public class ProcessForGroupCreation extends AbstractProcessForGroup implements Runnable JavaDoc {
12     private ProxyForGroup proxyGroup;
13     private String JavaDoc className;
14     private Object JavaDoc[] param;
15     private String JavaDoc node;
16     private int index;
17
18     public ProcessForGroupCreation(ProxyForGroup proxyGroup, String JavaDoc className,
19         Object JavaDoc[] param, String JavaDoc node, int index) {
20         this.proxyGroup = proxyGroup;
21         this.className = className;
22         this.param = param;
23         this.node = node;
24         this.index = index;
25     }
26
27
28     public void run() {
29         try {
30             this.proxyGroup.set(this.index,ProActive.newActive(className, param, node));
31 // this.proxyGroup.decrementWaitedAndNotifyAll();
32
} catch (Exception JavaDoc e) {
33             e.printStackTrace();
34         }
35     }
36
37     
38     public int getMemberListSize() {
39         return 1;
40     }
41
42 }
43
Popular Tags